How to import .lib file into C# application RRS feed

  • Question

  • Hi,

    I have a static .lib file which contains 'C' functions. How to import this library file into C# application and call the C functions in .lib library file.


    Wednesday, December 19, 2012 11:58 AM


  • You will need to compile the .lib file into a DLL to access it from a C# app. The best way would probably be to create a Windows Runtime Component to expose the lib's functions as runtime classes, but you could also create a normal DLL which exports the functions and p-invoke them.


    • Proposed as answer by BhashTech Thursday, December 20, 2012 1:34 PM
    • Marked as answer by Jesse Jiang Monday, December 24, 2012 3:13 AM
    Wednesday, December 19, 2012 8:16 PM