.NET c# application call win32 regulare dll api

C

Chi Tang

Hi,

Does anybody know how to call a unmanaged win32 dll function from a .NET C#
managed application? Do I need to write a managed C++ dll or a COM dll
which become a server of .net C# app or I can just 'import' the win32 dll
into my .NET C# application? Where can I get the sample? Thanks a lot for
any help,

CT
 
C

Chi Tang

Nicholas,

Appreciate your help. This is exactly what I need. Thanks again,

CT

Nicholas Paldino said:
Chi,

Check out the section of the .NET framework documentation titled
"Platform Invoke Tutorial", located at (watch for line wrap):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/
vcwlkPlatformInvokeTutorial.asp

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Chi Tang said:
Hi,

Does anybody know how to call a unmanaged win32 dll function from a .NET C#
managed application? Do I need to write a managed C++ dll or a COM dll
which become a server of .net C# app or I can just 'import' the win32 dll
into my .NET C# application? Where can I get the sample? Thanks a lot for
any help,

CT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top