I have a library in C-language. is it possible to use it in C sharp.
http://zbar.sourceforge.net/ is the link of library i want to use
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
C Libraries compiled for Windows can be called from C# using Platform Invoke.
From MSDN, the syntax of making a C function call is as follows:
The above calls the function Beep in Kernel32.dll, passing in the arguments frequency and duration. More complex calls are possible passing in structs and pointers to arrays, return values etc…
You will need to ensure that the C functions available by the C library are exported appropriately, e.g. the Beep function is likely declared like this: