I have a .NET (C#) component that via COM interop is called from C++ and VBA
so it can be called from the CAD packages AutoCAD and Microstation.
I now have a need to be able to call it from IntelliCad.
Is it possible to call a .NET component from a win32 Dll written in "C", and
if so can anyone point me to an example?
Thanks,
Jon
Rob Locher - 30 Sep 2004 18:14 GMT
As I interpret it, another way to ask your question could be "Is it
possible to call a COM component from a Win32 DLL written in C?" I
would suspect that the answer would be yes, as long as you can call
the Win32 API. You would need a good understanding of COM so that you
can use it without the kind of help that frameworks typically provide.
But you could call CoCreateInstance() and so on as long as you have
access to the Win32 API. The Win32 API is written for C.
Any good book that introduces COM to the C++ programmer can tell you
how to do it. I use "The COM and COM+ Programming Primer" by Alan
Gordon, ISBN 0-13-085032-2 for that sort of thing.
- Rob
> I have a .NET (C#) component that via COM interop is called from C++ and VBA
> so it can be called from the CAD packages AutoCAD and Microstation.
[quoted text clipped - 7 lines]
>
> Jon