Robert,
I don't have C++ unmanaged class, it is a third part dll.
The DllImport has a choice called "CallingConvention" which has a enum value
"ThisCall" to let you deal with accessing class members, I just can't find a
good example.
Hang
> Unless you wrote the C++ unmanaged class and can recompile the source code
> with additional functionality, what you're asking for cannot be done.
[quoted text clipped - 17 lines]
>>
>> Hank
Christian Fröschlin - 11 Aug 2006 08:38 GMT
> I don't have C++ unmanaged class, it is a third part dll.
> The DllImport has a choice called "CallingConvention" which has a enum value
> "ThisCall" to let you deal with accessing class members, I just can't find a
> good example.
An example can be found under (mind line wraps):
http://www.codeproject.com/useritems/usingcppdll.asp?df=100&forumid=308246&exp=0
&select=1507950
Although not impossible, it is rather ugly due to name mangling.
It is probably best to write a wrapper DLL in C++, either
o unmanaged, exposing a flattened extern "C" API
o unmanaged, exposing a COM API
o mixed-mode, exposing a managed API