We have a custom COM component implemented in C++
(myLibrary). Applying tlbimp shows marshalling errors,
which are to be expected.
However, a constructor error also shows up when the
component is used in vb.net (myTestConsumer.exe).
When the statement 'mInstance = new myLibrary.myClass' is
stepped into in debug mode, a series of messages is
written to the output window:
Cannot locate <methodname0>
Cannot locate <methodname1>
Cannot locate <methodname2>...
If I continue, I get the error message:
An unhandled exception of
type 'System.NullReferenceException' occurred in
myTestConsumer.exe
Additional information: Object reference not set to an
instance of an object.
I'd be grateful for any feedback. Thanks,
Joe
Ying-Shen Yu[MSFT] - 30 Sep 2003 05:25 GMT
Hi Joe,
Thanks for using MSDN Newsgroup.
It seems like the interop assembly was not generated correctly.
But with limited information about the COM Component and the interop
assembly,
I can't figure out what's wrong with it. If it possible, could you send me
the component and the tlb file and the generated COM interop assembly. I
need repro this problem and do some research on it. Also, I'd like to know
more about your COM Component (created by which IDE?) and your .NET Develop
environment.
If you have anything unclear, please let me know.
Thanks!
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!
--------------------
| Content-Class: urn:content-classes:message
| From: "joe pfeffer" <msdnsub@bah.com>
[quoted text clipped - 43 lines]
|
| Joe