logo       

RE: Can I call unmanaged code from managed code?: msg#00020

Subject: RE: Can I call unmanaged code from managed code?
Yes. There are two basic options:

P/Invoke - do a search in the docs, start with http://www.pinvoke.net for
method signatures for many Win32 API's.

Managed C++ - you can used managed C++ to create a managed wrapper around
existing unmanaged C++ code.

COM Interop - calling into existing COM objects.

P/Invoke only works if the code you want to call is in a DLL.

-Chris

-----Original Message-----
From: padnug@xxxxxxxxxxxxxxx [mailto:padnug@xxxxxxxxxxxxxxx] On Behalf Of
Ted Kubaska
Sent: Monday, August 08, 2005 9:56 AM
To: padnug@xxxxxxxxxxxxxxx
Subject: [padnug] Can I call unmanaged code from managed code?

Can I call unmanaged code from managed code? I'm thinking of some ASP .NET
opposite number for the Java Native Interface (JNI). Do people do this?

My reasons are 1) accessing some C/C++ legacy code and 2) dropping into
assembly for some selected routines.

 -Ted





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hhipvep/M=362335.6886445.7839731.1510227/D=groups/S=1705007709:TM/Y=YAHOO/EXP=1123528267/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

 


<Prev in Thread] Current Thread [Next in Thread>