DLLImport for C lib

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have to call a method written C inside my C# code.This C code is compiled
to .lib .
Do i need to convert this to a dll before using it in my C# code or can I
import the lib file itself.If anybody have idea how to import this in C#
code,it will be a great help to me.Please reply.

Thanks,
Bharath
 
Bharath said:
Hello,

I have to call a method written C inside my C# code.This C code is compiled
to .lib .
Do i need to convert this to a dll before using it in my C# code or can I
import the lib file itself.If anybody have idea how to import this in C#
code,it will be a great help to me.Please reply.

Thanks,
Bharath

If you have the code for the lib, just compile it to a DLL, if not you'll have to build a
DLL that thunks into the lib.

Willy.
 
Back
Top