473,320 Members | 1,876 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,320 software developers and data experts.

[.NET Managed C++] How to marshall data witout PInvoke ?

Hi all,

I want to wrapp an exiting API written in C++ to .NET using managed
C++ extensions.
I want my managed C++ class library to link with the unmanaged dll. So
I don't use PInvoke for marshalling data's.

I don't want to wrapp some basic classes but rather re-write then into
managed C++ code. Let say I have a basic class named Vec3f which
stores 3 floating values. I re-write this class in managed C++ using
__value keyword to specified it's not a gc class. Let's call it
MgVec3f
Many methods of my unmaged dll uses as parameter Vec3f passed by
reference.

I have a class method oneMethod(Vec3f &vec) in unmamaged code. I
wrapp it to oneMethod(MgVec3f &vec) in my managed class.

My question is: How can I marshall MgVec3f to Vec3f without PInvoke ?
Is there a way to do this without making a copy ? What is the best
way (for performances) ?

Thanks in advance

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 17 '05 #1
0 1043

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

Similar topics

3
by: New World Order Pigs | last post by:
Sorry if this is the wrong group, but it seems like a good place to start. I have a control, creating a dll written in c#/.net and some unmanaged code in c++ using embedded c++ V3. Yes, it is for...
2
by: Weston Fryatt | last post by:
(Sorry for spamming multiple groups, But I need a solution to this problem) I think this should be a simple question on Memory Allocation in a managed DLL and passing a memory pointer over to an...
2
by: awk | last post by:
Hi All I have a com dll written in VB6 (it's a User Function Library for my crystal reports - this allows me to write custom functions for Crystal which can be applied in Crystal formulas - none...
7
by: Klaus Bonadt | last post by:
I have an existing VC6 application using the MFC. I am able to pass CString and other parameters from such a VC6 dll to an unmanaged MFC dll (compiled in Visual Studio .NET). Now I want to use...
7
by: Lee Crabtree | last post by:
I'm starting work on what will eventually be a very, very LARGE project. A lot of the project involves taking C/C++ class libraries and wrapping them with managed C++. I'd like to minimize the...
3
by: Dave | last post by:
I've seen at least one article on this: How to access classes, etc. managed-to-unmanaged. I can't find it. Any tricks or pointers? I guess the class name won't get munged but I'm not clear about...
6
by: Scottie_do | last post by:
I've heard from the CDO team that managed code is unsupported. With a site like www.pinvoke.net it's possible that I'll easily end up with a faulty application architecture that will require a...
2
by: RYoung | last post by:
Given this native struct: typedef struct vendor { char name; } VENDOR I want to make managed equivalent, so I did this: public value struct Vendor
1
by: Allen Maki | last post by:
I would be pleased if someone gives me a general idea; how I am going to do this. I am using visual C++ .NET 2003. I made a simple program using conventional C++ code. This program accepts...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.