Accessing C++ #defines and typedefs in a .NET project

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this situation where I need to access the #defines and typedefs
defined in a C++ header file from a .NET Project (specifically C#). The C++
header file is from a medical device manufacturer which my software needs to
communicate with.

How can I do this?

Please let me know if you need more information.

I would greatly appreciate all responses.

Regards,
Bob
 
TheCuriousOne said:
I have this situation where I need to access the #defines and typedefs
defined in a C++ header file from a .NET Project (specifically C#). The
C++
header file is from a medical device manufacturer which my software needs
to
communicate with.

How can I do this?

It might be worthwhile to write your code that needs to communicate directly
with that device in C++/CLI. Then you can use the header file just like any
C++ program, but your classes can be used by C#.
 
C# does not know anything about #defines and typedefs, but your C++ project
know if it includes the header file. Create a middle layer in C++ and call
it in C#..
 
Back
Top