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 > october 2004 > threads for october 1 - 7, 2004

Filter by week: 1 2 3 4 5

System.Runtime.InteropServices.COMException: Class not registered
Posted by Donnie at 10/7/2004 4:13:05 PM
Hello, I'm trying to develop an ASP.NET application that uses a third-party COM dll. I've added a reference to the dll in the web app project along with adding a "using" directive in the code-behind (referencing the COM namespace). Every time I try and run the application and call methods o...more >>


TypeLib created has no methods
Posted by NOtcarvinSPAM NO[at]SPAM lycos.com at 10/7/2004 12:36:12 PM
My simple problem is that when I use either RegAsm or TlbExp on a .NET Assembly, the TypeLib created doesn't contain any methods. Only my classes are in there. I'm assuming this is just my inexperience in using COM Interop? Any help appreciated. Tom...more >>

MSXML and C#
Posted by Matej Trampus at 10/7/2004 8:05:06 AM
Can anybody provides me with more information about interop between MSXML and C#. There is a knowledge base article on this subject: 815112 INFO: Use of MSXML is Not Supported in .NET Applications .... but it provides very little information. I have several questions: 1. I am in worki...more >>

Explorer Context Menu / IcontextMenu2 Interface
Posted by Jeff Gaines at 10/6/2004 11:09:34 AM
I am working on a file manager type app (in C#) that use the API/Interop quite extensively. I am managing to get Explorer's context menu to appear and all of the items show up properly (and work) except the 'Open With' item. I am trapping the appropriate messages in my WndProc as follows: ...more >>

Exposing .Net struct in COM
Posted by Mads at 10/6/2004 1:53:03 AM
I'm trying to make my own ValueType in C#, i need to call this from COM so i need to expose it. When i'm trying to assign it from COM it says "Incompatible types: FinVal and Integer" public struct FinVal { private bool _assigned; private bool Assigned { get { return _assig...more >>

marsal string array inside a struct
Posted by Luis Abreu at 10/5/2004 11:20:49 PM
I want to implement the interface IPerPropertyBrowsing. I'm having some doubts regarding the correct implementation of this method: HRESULT GetPredefinedStrings( DISPID dispID, //Dispatch identifier for property CALPOLESTR *pcaStringsOut, //Receives a pointer to an array of ...more >>

"regasm xxx.dll" vs "regasm xxx.dll /regfile"
Posted by GT at 10/5/2004 11:09:02 PM
Is this a regasm bug or does anyone have an explanation to this behaviour? I have a com dll that defines additional "Implemented Categories". When I register with regasm they are defined in the registry as expected. When I try to create a registry file with the corresponding settings by ...more >>

Access to C# functions or classes from unmanaged C++
Posted by Clement at 10/5/2004 8:43:43 PM
I have made a dll in unmanaged C++ code using Visual Studio.Net 2003. I would like to access C# functions or class methods from this dll. The C# code would be in an other dll. Typically, the C++ code does shell interaction, while the C# part is a GUI and a web services client. The functions...more >>



error msg "assembly identity could not be determined"
Posted by Rudy at 10/5/2004 4:52:48 PM
I created a .NET-DLL and it should be called from a VB6 - program. I created key.snk file added the path to the assemblyInfo-file, I gave a GUID to all public classes, I created a tlb and ran gacutil. Also I see it under windows/assembly! Although when running VB 6 that calls the DLL I get an er...more >>

tlbimp.exe substitues coclass name for interface name
Posted by zhangrusi at 10/5/2004 2:19:02 PM
I am using tlbimp.exe to create managed wrappers around some COM objects. Suppose I have an interface IFoo, and a second interface IBar whose methods contain IFoo parameters. I am finding that if I add a coclass, CFoo, that implements IFoo, to my type library, tlbimp.exe replaces IFoo with C...more >>

How to create my own interop assembly?
Posted by Mansi at 10/5/2004 11:49:03 AM
Hi, I'm trying to automate excel 2000 from c# .NET. I also need for my code to work on Excel 2000 and 2003. Since there are no PIAs available for office 2000, what steps do I need to follow to create my own interop assembly for excel 2000. I'm assuming that once I link to this interop as...more >>

How to pass by reference to a managed C++ method
Posted by Chandra at 10/5/2004 11:01:01 AM
void foo(int& a, int& b) how can this method be called from C#? foo( ref a, ref b) doesnt work?? Thanks!...more >>

IJW Memory Management
Posted by Luis Fajardo at 10/5/2004 8:47:03 AM
I need the help of the C++ gurus out there. I have the following code, it's working great, but I'm concern about the lack memory management I'm doing. I just want to confirm if I'm doing something wrong or my code is fine. I don't want to put this code in production and find out in some day...more >>

defining the 'LIB' as a variable(VB)
Posted by Tom Potts at 10/5/2004 6:33:07 AM
rather than Declare Function initscr Lib "stringpathto.dll" () As IntPtr is there a way of using a constant similar to the following (which doesnt work..) Dim const dllpath as string = "stringpathto.dll" Declare Function initscr Lib dllpath () As IntPtr as I've got some very large dlls...more >>

Exception from Managed Component being swallowed in Interop
Posted by Ian Tompsett at 10/4/2004 11:13:02 PM
I've got an OCX written in VB6 that has been successfully wrapped in a .NET user control (in C#) using COM interop. The OCX exposes a method for going off to a database and populating itself. If anything goes wrong in this process it raises an event (using RaiseEvent), which I'm happily ...more >>

memcpy equivelant in C#
Posted by Torben at 10/4/2004 10:11:13 PM
Hi, I am currently trying to re-write some VC++ code into C# but are having problems finding a way to convert the C++ memcpy into C#. The following is part of the existing code: static int search_count; static CFGINFO SearchInfo[MAX_DEVICE_NUM]; typedef struct _DS_INFO{ DWORD ...more >>

Import Type Library from C# .net into Delphi 5
Posted by Jimmy Lim at 10/4/2004 9:07:05 PM
I am facing a problem using Delphi 5 here. I used tlbexp.exe to export Type Library file from .net assembly. With the ***.tlb file, i tried to import into delphi and install it on the component palette. The following errors shown:- [Error] mscorlib_TLB.pas(4515): Type 'Byte' is not yet complete...more >>

LPWSTR
Posted by Robert Misiak at 10/4/2004 7:02:05 PM
How do I marshal a LPWSTR argument? I need to read the string value after calling the function. Should I use ref or out? Something like: static extern void Function([MarshalAs(UnmanagedType.LPWStr)] ref string lpwVal); ?? Thanks, Robert ...more >>

Limit on number of COM objects in C#/.NET???
Posted by Shawn Anderson at 10/4/2004 5:24:10 PM
Does anyone know if there is a limit to the number of COM objects that can be opened from a .NET application? I know it may be an odd question, but I am trying to track down a bug in some code using the Outlook interop objects and this is the only thing I have left to think ok. Thanks ...more >>

DHCP Server Management API - DhcpEnumSubnetClients
Posted by MichaelDH at 10/4/2004 1:49:04 AM
Hello, I'm about to script web page using .NET to manage DHCP servers. Everything works fine so far as I'm using the dhcpobjs.dll. The point is that I need to dump the current leases from a scope. As this is not possible by the dhcpobjs.dll I used a netsh command and querying the stdou...more >>

Preventing Outlook Messages.
Posted by Tim Marsden at 10/1/2004 5:04:21 PM
Hi, I am using VB.Net to send a confirmation e-mail when a program has finished. However when I do this I get messages "A program is trying to access e-mail account ... etc" . These messages require action before the program can continue. I want to program to run unattended. How do I prev...more >>

"C# call VC COM, passing in memory block address" Revisit
Posted by Liping at 10/1/2004 4:59:02 PM
Hi, I felt so lucky to find this discussion dated of Aug. 1st, because we are having a similar problem. But as I tried a couple of times following the steps carefully, only failed to work it out.( I modified the RCW wrapper's IL file instead of the Windows Forms callable wrapper's IL file, ...more >>

Issue with ASP.NET client, COM Interop, and Identity impersonation
Posted by Anil Krishnamurthy at 10/1/2004 4:29:51 PM
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The problem is that even when it is configured to run under a certain identity through Web.config, the imp...more >>

Problems with object Identities in RCW
Posted by Ralf Heitmann at 10/1/2004 3:15:28 PM
Hi, By doing interprocess calls .NET --> COM (Exe server) I get the following strange behaviour: The identity of my COM instances get sometimes lost. I have the following reproducable case (manager and the three "test" instances are of type "__ComObject". test1 and test2 references to...more >>

Freeing excel object
Posted by Andreas HÃ¥kansson at 10/1/2004 2:33:11 PM
I'm using Excel (using a COM Wrapper, not the PIA) do export some information, once done I want to close the Excel process but can't seem to get it right. I've been searching the newsgroups and it seems to be a common problem, and it doesn't seem that there is a universal solution - instead s...more >>

SHFileOperation as class (not struct) problem
Posted by Mike Lansdaal at 10/1/2004 1:23:05 PM
I have a rather odd problem with the API call SHFileOperation from C#. I started out with defining a SHFILEOPSTRUCT as a struct, but switched to defining it as a class after FxCop flagged an error about not implementing IDisposable (and since structs can't have finalizers, I was unable to ful...more >>

Pointer To Object
Posted by Thomas Fisher at 10/1/2004 12:40:00 PM
Hello All, I'm pretty new to interop so this could be a really simple problem. In trying to get a managed object from a pointer the following error is thrown: "The structure must not be a value class." Here's the code I'm using in VB.Net: Dim VIH2 As DVDMedia.VIDEOINFOHEA...more >>

Writefile: the parameter is incorrect
Posted by cjohns NO[at]SPAM gmail.com at 10/1/2004 12:20:51 PM
Hi I've got a problem which I just can't solve. My writefile() call is giving me an ERROR_INCORRECT_PARAMETER, and I have no idea why. The createfile has succeeded, because I have independent verification of that from the device that I'm trying to talk to (e.g. DeviceIOControl commands work...more >>

PInvoke threading issue
Posted by Brett Robichaud at 10/1/2004 12:05:22 PM
I have created a simple background thread to make one pinvoke call into a DLL I've created. My Winforms app spawns the thread in the form load event then go about it's business. The problem is that my form appears to be blocked while the background thread is running. I am very familir with t...more >>

HOWTO delete Word CustomDocumentProperty
Posted by spaceodyssey NO[at]SPAM tiscali.it at 10/1/2004 8:19:24 AM
I try to set a CustomDocumentProperty in a Word/Excel File i opend using Office PIA and C#. Everything's fine except I CAN'T FIND THE WAY TO DELETE IT!!!! Here is some code... [CODE] object oDocCustomProps; string strIndex = "idDocs"; string strValue; oDocCustomProps = oDoc.CustomDocumen...more >>


DevelopmentNow Blog