how to import c++ platform sdk files into csharp project

  • Thread starter Thread starter matthias
  • Start date Start date
M

matthias

hello everybody !

i want to use the microsoft platform sdk c++ functions of the npp to capture
data from network with visual studio .net and csharp.
how can i import the c++ headers files to use the functions in my csharp
programm ?
any information is helpfull ;-)

matthias
 
matthias wrote:
|| hello everybody !
||
|| i want to use the microsoft platform sdk c++ functions of the npp to
|| capture data from network with visual studio .net and csharp.
|| how can i import the c++ headers files to use the functions in my
|| csharp programm ?
|| any information is helpfull ;-)
||
|| matthias

You can't import C header files in C#. C style function declarations have to be translated into .NET style PInvoke declarations, C
style structures into C# style structs, typedefs into const declarations etc....
While this can be done for a small number of API's, it's generally advisable to wrap the C style API' calls in a managed C++ class
(or classes) when data structures are getting complex and/or the number of API's is large.

Willy.
 
Back
Top