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 / January 2005

Tip: Looking for answers? Try searching our database.

Calling functions from .NET dll from Win32 C++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Igor - 27 Jan 2005 11:22 GMT
I need to call functions in the .NET assembly (dll) from an unmanaged application via winAPI calls (LoadLibrary...). I've found examples on how to modify the .IL code of an assembly so I can export the methods needed, but I have a following problem :

Everything works fine when I use __stdcall calling convention from an unmanaged app, but when I switch to __cdecl managed dll loads and executes only the first time??? Subsequent calls to the function result in a fatal error???

Please, help :)

Thanx
Daniel Petersson, Cefalo - 31 Jan 2005 11:19 GMT
Hi, I would recomend you to expose the managed functions
to win32 through mC++ instead of modifying the il code.
It is safer and less error prone. // daniel

> I need to call functions in the .NET assembly (dll) from an unmanaged application via winAPI calls (LoadLibrary...). I've found examples on how to modify the .IL code of an assembly so I can export the methods needed, but I have a following problem :
>
[quoted text clipped - 3 lines]
>
> Thanx

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.