Calling C# assembly from C++ dll in Windows 4.2 .NET

G

Guest

I am looking for a way to call methods in a C# assembly from a dll written in C++ on Windows CE 4.2 .NET

i have allready been looking at tlbexp.exe but cant get it to work.
Most of the examples i have found calling C# assemblies from C++ uses an
"managed wrapper" written in C++ to accomplish the task, but this is not an
option in .NET CF. (PLease correct me if i am mistanken)

Can anyone help me ?
 
G

Girish NS

Hi,

tlbexp.exe will not work with Windows CE. if ur C++ dll is a normal dll
exporting some functions, u can use the plaform invoke feature of .NET CF to
call them from ur C# code. .NET CF 1.x does not offer native support for
calling COM dlls.

If it is a COM dll then there are 2 ways :

1. first is u can written a WIN32 dll containing wrapper functions
encapsulating the functionality of COM dll.
2. The second way is u can use Odyssey Software 's CFCOM component to use
the COM dll within ur C# code. The following link to a article illustrates
how to use CFCOM to call COM dlls from .NET CF.
http://msdn.microsoft.com/mobility/...x?pull=/library/en-us/dnppc2k3/html/cfcom.asp

HTH,

Girish.
 

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