Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,
I have a class inside a Dll.

Is there any way i can use this class in C#?
I checked for DllImport, i see it can be used to access unmanaged-function, can any one suggest, whether this can be used to access a class inside a C++ dll.
If so, please suggest!


Thanks,
Arun P.
Posted

1 solution

This is possible. As far as I know you have two options.
1. You use a C++/CLI wrapper to access the unmanaged Code
2. You use COM interop functionality as described here:
Using Unmanaged C++ Libraries (DLLs) in .NET Applications[^]
You should also read through this:
http://msdn.microsoft.com/en-us/library/ms973872.aspx[^]
and that
Using Unmanaged code and assembler in C#[^]
 
Share this answer
 
Comments
Espen Harlinn 29-Sep-12 6:51am    
5'ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900