Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / September 2004

Tip: Looking for answers? Try searching our database.

Calling a .NET component from "C"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon Prisbe - 28 Sep 2004 14:22 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.