Reputation: 45
I've got plenty of these object file library : addrstor.exp authhlp.lib
I would like to have them as a DLL and add into the C# project and try to use the method which involved.
How could I achieve that ?
Thanks
Upvotes: 0
Views: 477
Reputation: 4427
C# is ideally suited to calling in to "C" functions. One way is to create an C adapter to the C++ functionality:
Step 1: Expose a C function from the DLL:
extern "C" __declspec(dllexport) int someMethod(int paramA);
Step 2: Import in to C#
[DllImport("your.dll", EntryPoint="someMethod")]
public static extern UInt32 NiceNameFunc(UInt32 paramA);
Upvotes: 2
Reputation: 100630
Assuming you want calling native DLL (C++/libs) called from managed (C#) code:
If you want compile C++ Libs to managed DLL (assembly) - you can't do that. You may be able to use managed C++ to compile sources to a assembly.
Upvotes: 1