Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / August 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TheCuriousOne - 17 Aug 2007 22:53 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 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.