Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
all groups > dotnet interop > april 2006 > threads for april 8 - 14, 2006

Filter by week: 1 2 3 4 5

Cannot successfully can C++ function from C#
Posted by Mike at 4/14/2006 2:41:08 PM
I have been banging my head againt my desk for a couple days now and nothing I try seems to work. I know I am missing something small and it's killing me. This is the error I am getting with this code: A call to PInvoke function 'SmartworksTest!SmartworksTest::MTGetEventCodeDescription'...more >>


System._Comobject Exception (E_NOINTERFACE)
Posted by hankman at 4/14/2006 12:05:30 PM
Hello, I am trying to connect to an automation server. I've imported the type library and everything matches with the tlb file when I view it using the old OleViewer. I n the old vb6 days I just used Getobject("BACtalk.ActiveX.Interface") and everything worked just fine, Now I am trying ...more >>

Help with Marshaling an Array of Pointers from COM to Managed Objects
Posted by Joshua Taylor at 4/14/2006 11:50:21 AM
Ok so I've been beating my brains out over this for two days now pouring through the SDK, MSDN Documentation, and the Internet at large. I'm not new to programming or .NET, but definately new to Interop and shell programming, and am getting tripped up by all the marshaling, importing, and po...more >>

How to determine if the windows screensaver option "on resume, display windows Welcome screen" is checked
Posted by Rob Latour at 4/14/2006 9:35:56 AM
using vb.net (2005) how can I determine if the windows screensaver option for "on resume, display windows Welcome screen" is checked? Thanks in advance, Rob ...more >>

using /namespace with tlbimp.exe
Posted by Farrukh at 4/13/2006 5:53:07 PM
Hi I want some information regarding /namespace switch. Is this the name of Namespace of the source code where our COM dll is referenced for which we will generate Interop.dll or is this some variable string or what? Thanks in advance. Best regards Farrukh ...more >>

Invoking C# object from C++ DLL
Posted by Daniel F. Devine at 4/13/2006 5:50:30 PM
I wish to provide a C++ DLL interface for non-framework clients to access a C# DLL - is this possible? I have had some limited success by using a pimpl idiom to cross from unmanaged to managed - but anything more than a simple message output yields an exception. I cannot debug past the C++/C# ...more >>

convert unmanaged pointer to managed pointer?
Posted by Alan Baljeu at 4/13/2006 10:36:56 AM
I have some C# code I want to use from C++. One of the C# method's parameters expects a COM interface (which was defined in a separate COM component, which is used by both of my assemblies), but I can't seem to pass a COM interface over to C# because I get error C2664: cannot convert par...more >>

C++ dll1 calls c#-wrapper-dll calls C++ dll2
Posted by MSDNAndi at 4/13/2006 9:08:02 AM
Hi, I have the following situation: I have one C++-dll that I am not allowed to touch (dll1) dll1 calls a C++ dll2. Now, I have to "plug" myself in with a c# dll. I can change dll2. The reason is, that functionality in dll2 will over time be implemented in C# (wrapper DLL) and over time less ...more >>



How can I call COM+
Posted by ocelka NO[at]SPAM ics.muni.cz at 4/13/2006 3:27:12 AM
I have COM+ Application (running as a server under user S), where I inserted C# class MyServerClass. Now I need call these class - but throw COM+ Application. If I use VBScript as client - I have no problem: Set s=CreateObject("MyServerClass") but If I use C# I down know how I create calli...more >>

convert this cpp to c#
Posted by FUnky at 4/12/2006 7:47:04 PM
AfxOleGetMessageFilter()->EnableNotRespondingDialog(FALSE); AfxOleGetMessageFilter()->EnableBusyDialog(FALSE); Many thanks in advance. ...more >>

Calling C# from C++
Posted by Daniel F. Devine at 4/12/2006 8:38:04 AM
I wish to provide a C++ DLL interface for non-framework clients to access a C# DLL - is this possible? I have had some limited success by using a pimpl idiom to cross from unmanaged to managed - but anything more than a simple message output yields an exception. I cannot debug past the C++/C...more >>

Casting Problem
Posted by RC at 4/12/2006 12:00:00 AM
I have a dll written by VB6 and I've use "tlbimp" command to produce an interop assembly. I now try to use reflexion to create an object from VB6 DLL to .NET environment and cast it back (eg. ClassA) Actually, it's a portion of an ASP.NET application. The DLLs were places under "\bin" fo...more >>

How to encapsulate an ActiveX Control in dotnet
Posted by NorthSky at 4/11/2006 10:04:01 PM
Hi, I try to encapsulate an ActiveX Control to output the specified fileName. Such as : I have an ActiveX control :U8RefEdit.ocx and wanto get two file: COM Interface file :Interop.U8Ref.dll and Activex File:Axinterop.U8RefEdit.dll copy %InteropPath%\Interop.MSXML2.dll %VBDllP...more >>

C# 2 .NET 2 and Outlook automation
Posted by toduro at 4/11/2006 10:40:45 AM
I'm trying to use a C# program to read the Outlook Sent Items folder. The constructor: Outlook.Application oApp = new Outlook.Application (); throws exception: System.IO.FileNotFoundException: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-00000000004...more >>

marshal 2-d arrays, structure members, and arrays of structures
Posted by Dan Humphrey at 4/11/2006 7:00:03 AM
Hi. I'm writing a C# front end to replace a spreadsheet/vba front end to our legacy dcom server written in C++. I'm just learning .NET (learn by doing, they say) and I don't really know any COM, so apologies if the answers are obvious. I've managed to mostly understand the process for manag...more >>

Instantiating a .Net class in MS Excel Macro
Posted by Shilpa at 4/11/2006 2:18:14 AM
Hi, I am trying to instantiate a .Net class in the VB editor of MS Excel (PE 2003) Macros. I have added the reference to the tlb of the .Net (TestProject) project. I am able to create the object as dim x as TestProject.TestClass But the following line of code is causing a runtime error. se...more >>

Needed advise in the use of IntPtr within PInvoke
Posted by eduwushu at 4/11/2006 12:51:02 AM
Hi there, I have some doubts about the using of PInvoke to import dll functions. Let's see I have a function which returns a pinter to a structure to open a network adapter LPADAPTER PacketOpenAdapter(LPTSRT AdapterName); and i have other which is used to close the adapter and free the ad...more >>

Problem passing string as BSTR string to C DLL - Nullreference exception
Posted by msnews.microsoft.com at 4/11/2006 12:00:00 AM
Platform: VB.Net 1.1 I am trying to pass a string in VB.Net to a C Dll method which accepts a BSTR. I get a nullreference exception whenever I call the API. The following VBA declaration works fine in my previous Application: Dim ddl As String .... set_DatafilePath (ddl) .... Declare ...more >>

Interop with 32-bit and 64-bit
Posted by Christian_Fröschlin at 4/10/2006 5:03:10 PM
Hello, I'm writing a .NET assembly wrapping a native DLL which is available in both 32-bit and 64-bit versions. The main difference in the API is that some integer parameters map to System.Int32 in the 32-bit version and to System.Int64 in the 64-bit version. I'm am currently evaluating how...more >>

COM InterOp - InterOp assembly marking a char **buffer as System.IntPtr instead of out System.IntPtr
Posted by sanjeev NO[at]SPAM securlinx.com at 4/10/2006 12:32:41 PM
I have the following problem if referencing a COM assembly from a C# program. The method GetImageFrame declared as HRESULT GetImageFrame([in] long capDeviceIndex, [out] ULONG *pSize, [out, size_is(,*pSize)] BYTE **ppImageBuf); in the COM IDL is displayed as GetImageFrame(int, out ui...more >>

strong singing and calling the correct version
Posted by Wayne Sepega at 4/10/2006 9:16:53 AM
This may go along with my previous post but here goes: I've done the following: Created an assembly with a class that is exposed to COM Signed the assembly Placed the assembly in the GAC Registered the assembly so it can be called via COM Tested everything went OK Then...more >>

Classic ASP and multiple versions of comvisible .net classes
Posted by Wayne Sepega at 4/10/2006 8:58:53 AM
I have a class assembly that I have made visible via com. I've strong named it, put it in the GAC, and registered it with RegAsm, and have successfully called it from ASP and a VBScript file. I then incremented the version # of the assembly and made a slight code change. The ASP and VBScript c...more >>

Exporting to Excel
Posted by Gudni G. Sigurdsson at 4/10/2006 8:46:02 AM
I want to build an Excel Worksheet from a VS2005 program. I have downloaded a C# sample program from Microsoft called AutoExcel. It builds OK, but when I try to run it, I get an error at this line: _Workbook workbook = workbooks.Add(XlWBATemplate.xlWBATWorksheet); The error message is: Unha...more >>

InternetShortcut and IUniformResourceLocator
Posted by Koji Ishii at 4/10/2006 8:28:03 AM
Has anyone successfully create/read internet shortcut files (*.url) from .NET? When I create an object for CLSID_InternetShortcut {FBF23B40-E3F0-101B-8488-00AA003E56F8}, I can cast it to IPersistFile, but I can't cast to IUniformResourceLocatorW {CABB0DA0-DA57-11CF-9974-0020AFD79762}. It lo...more >>

using a BHO to capture key strokes from IE alone
Posted by Hema at 4/10/2006 8:07:25 AM
Hi all, I have developed a BHO that installs low level keybaord hooks and CBT hooks globally whenever IE is opened.The keys that are pressed when IE is active are to be captured.I am trying to check whether the IE is active first, If it is i set a boolean flag.In the key hook proc ,if the flag ...more >>

Quick Early V-Table Binding + CCW Question.
Posted by Chris Lane at 4/10/2006 6:59:01 AM
Hi, Will defining Your own interface in a .NET library and marking it as [ClassInterface(ClassInterfaceType.None)] allow the COM Client to call the ..NET CCW using early(V-Table) binding? Thanks, Chris ...more >>

Marshaling a mixed Unicode/ANSI string
Posted by eduwushu at 4/10/2006 3:40:02 AM
Hi there, Im trying to pInvoke a function od the packet.dll library of winpcap (i know it is already done but im doing it as an exercise). So I have the function GetAdapterNames which is like this: BOOL PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize); Allright the first thing i done wa...more >>

w3wp.exe hangs frequently when the .NET application uses a COM component which makes use of CMAPs andCString.
Posted by nitin at 4/10/2006 2:44:05 AM
Hi, I have a Web application written in C# which makes use of our underlying COM components. The application when hosted on Windows 2003, hangs frequently when used under heavy load. The hang dump(AD+) taken for the w3wp.exe process shows our COM component calls. The lowest call on the sta...more >>

interop error on ADO to excel copyFromRecordset(rs)
Posted by fartlegs NO[at]SPAM gmail.com at 4/9/2006 2:50:36 PM
Hi, I'm running into a problem with relatively long fields (this one is 1351 chars long) where it's failing on the copyFromRecordset(rs) call. The exception I'm getting is: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll Additional ...more >>


DevelopmentNow Blog