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" wrote in message news:FB55E467-3F3E-42E7-933D-C712AB37F526@microsoft.com... >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#. > > Please let me know if you need more information. > > I would greatly appreciate all responses. > > Regards, > Bob
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#.. -- Sheng Jiang Microsoft MVP in VC++ "TheCuriousOne" wrote in message news:FB55E467-3F3E-42E7-933D-C712AB37F526@microsoft.com... > 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