Interop different depending on how component is started
From: Steven Kilby (spam_at_nowhere.com)
Date: 12/23/04
- Next message: Peter Huang: "RE: Excel Automation Add-In Functions and C# question"
- Previous message: Jessard: "ADODB or dependencies not found"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 22 Dec 2004 20:06:21 -0800
I have a component (inproc dll) written in VB6. I have a client written in
C#. If I compile the component to native code everything works fine. I add
the necessary type library for my component to the C# project and everything
compiles and runs. I can debug both the C# code and the VB code in the
VS.NET IDE.
Now, on occasion, I would like to debug the VB code in the VB6 IDE and the
C# code in the VS.NET IDE. I tell the VB6 project to "Wait for component
creation" and start the project. Then, I start the C# application from its
IDE.
Here is the problem. When the component is started in the VB6 IDE the type
library previously registered for the component.dll file is replaced with a
new type library that refers to the component.vbp file. The type library
version is the same so the VS.NET sees the change and recompiles the C#
project before starting the application. The compilation fails because the
Interop layer generated by .NET for the VB component doesn't create
GetEnumerate() for the collections.
The Interop layer generated for the type library from the native compiled
DLL file does have GetEnumerate() for the collections. Bear in mind I can
reproduce this at will and there are no code or project changes. The only
difference is whether the type library is from the dll file or the one put
in place when the component is started from the IDE.
Does anyone have a clue as to what is going on?
Thanks
Steven
- Next message: Peter Huang: "RE: Excel Automation Add-In Functions and C# question"
- Previous message: Jessard: "ADODB or dependencies not found"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|