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
Ben Voigt [C++ MVP] - 17 Aug 2007 22:59 GMT
>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
[quoted text clipped - 4 lines]
>
> 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#.
> Please let me know if you need more information.
>
> I would greatly appreciate all responses.
>
> Regards,
> Bob
Sheng Jiang[MVP] - 17 Aug 2007 23:03 GMT
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#..

Signature
Sheng Jiang
Microsoft MVP in VC++
> 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++
[quoted text clipped - 9 lines]
> Regards,
> Bob