473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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
Aug 17 '07 #1
2 1478

"TheCuriousOne" <Th***********@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.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

Aug 17 '07 #2
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" <Th***********@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.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

Aug 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Xpyder | last post by:
Hey - i am working on a project and have encountered a problem. when i try to make a pointer in an object to hold the address of another object it works fine - but the problem is when i try to...
7
by: John Dolinka | last post by:
I have a project of several files with #defines to setup a conditional compile. I would like to put these #defines in a single file and change the conditional compile from this one file with the...
9
by: bubbakittee | last post by:
I am designing a package of functions to be used by people with very little programming experience (if any) and very little patience. I don't want to scare them with programmerish words like...
3
by: Vijayata | last post by:
Hi, Can anyone help me for how to access connection string defines in App.config file in an Windows form application. I`m doing project in C#.NET and SQL Server2000. So you are also pleased to...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
30
by: junky_fellow | last post by:
I was looking at the source code of linux or open BSD. What I found that lots of typedefs were used. For example, consider the offset in a file. It was declared as off_t offset; and off_t is...
7
by: Noah Roberts | last post by:
I have something like the following: template<ENUM X, int I = 0> class Generic { .... }; typedef Generic<Val1> v1_type; typedef Generic<Val2> v2_type;
14
by: rsood | last post by:
Hi I'm developing a program, and naturally I want it to be as portable as possible. I need to be able to access specific numbers of bytes in it, but as far as I know, there is no keyword in the...
5
by: Andy | last post by:
I'm having trouble accessing an unmanaged long from a managed class in VC++.NET When I do, the contents of the variable seem to be mangled. If I access the same variable byte-by-byte, I get the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.