.net - Use C library in C++ -


i have c library header file. want make wrapper in c++ in order use in .net. when include library, compiler reports syntax errors regarding variable types (dword, lpcstr, etc...). in short, thinks library in c++ instead of c.

i tried

extern "c"{    #include "c_lib.h"  } 

but no success. using visual studio 2010, maybe changes project settings should done.

any appreciated.

regards.

you need include <windows.h>, think you're doing wrong. don't need create c++ wrapper use library .net. can dllimport c functions need call, directly in c#.

using dllimport attribute


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -