using c++ .h files

  • Thread starter Thread starter Rustam Asgarov
  • Start date Start date
R

Rustam Asgarov

Hi.
How can i use function and other things defined in c++ header file.?
 
You can't use them directly in C#, however, you can call native DLLs (for
instance, Kernel32.dll) using Platform Invocation (P/Invoke). Use MSDN and
Google Groups to see many examples of how to prototype the functions you see
defined in C++.
-mike
MVP
 
Rustam,

You can not. C# does not recognise C++ code, although there are
similarities. If you have these functions in a DLL that exports them, then
you can declare your functions in C#, and they will be called through the
P/Invoke layer.

Things like constants and enumerations though, you will have to define
yourself.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top