using c++ .h files

  • Thread starter Thread starter Rustam Asgarov
  • Start date Start date
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.
 
Back
Top