473,473 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Unmanaged void* to .Net System::Array

I have an unmanaged C++ class representing a 2D matrix. It holds a
pointer to a block with the actual data, and fields indicating the
number, size and type of the matrix elements. Like this:

public class UnmanagedMatrix {
public:
void * block;
long rows;
long cols;
int type; //refers to an enum of possible types - char, long, double,
etc.
long sizeOfBlockType;
....
}

I am writing a managed wrapper to use this class from within .Net with
a member pointer to the unmanaged class in the usual way:

public __gc class ManagedMatrix {
private:
UnmanagedMatrix __nogc* pM;
....
}

I need the wrapper class to get and set the unmanaged block of matrix
data using System.Arrays. i.e I need methods like this:

public:
System.Array getData() {}
void setData(System.Array data) {} // maybe pass in the type as well?

Any help with these two methods would be appreciated.
I am not at liberty to modify the unmanaged class.
I am a C++ novice.

Aug 31 '05 #1
2 1815
Andrew Nefiodovas wrote:
I have an unmanaged C++ class [...]
I am writing a managed wrapper to use this class from within .Net [...]

Any help with these two methods would be appreciated.
I am not at liberty to modify the unmanaged class.
I am a C++ novice.

Please post to 'microsoft.public.vc.language'. "Managed" is off-topic
here. Here we discuss _only_ standard C++ language.
Aug 31 '05 #2
oops, sorry

Aug 31 '05 #3

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

Similar topics

5
by: Abraham Lopez | last post by:
Hi.. Is there a way to convert a System.Array to XML... If you know thanks very much... if you don't... Please do not respond stupid things like " Yes -- many ways."
4
by: Janus Knudsen | last post by:
Hello Im getting an error when I try to convert like this: string arrDSN; objDSN.GetDataSourceList(arrDSN) And the error: Argument '1': cannot convert from 'string' to 'ref System.Array'
2
by: Daniel Mori | last post by:
Hi, Im hoping someone can give me some advice. Im doing some development using VS Whidbey 2005 beta 1. Im about to implement some highly time critical code related to a managed collection of...
2
by: Chris | last post by:
Hi, the specs for System.Array are : MustInherit Public Class Array Implements ICloneable, IList, ICollection, IEnumerable but I can't use any of the functions presented by IList in my code ...
1
by: m830266 | last post by:
I'm trying to use the APAX serial I/O control (www.turbocontrol.com/AProZilla.htm) in a VB.NET project and I'm having trouble with its 'data received' events. The data is supplied by APAX as a...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
3
by: clawton | last post by:
Hi All - I've got a 3rd party COM object that returns an array of bytes that are a TIFF image. After adding the reference to the com object to my solution the C# signature for the method is...
9
by: Nathan Sokalski | last post by:
I am trying to use the System.Array.ForEach method in VB.NET. The action that I want to perform on each of the Array values is: Private Function AddQuotes(ByVal value As String) As String Return...
2
by: Fred Mellender | last post by:
I am trying to use reflection to output the fields (names and values) of an arbitrary object -- an object dump to a TreeView. It works pretty well, but I am having trouble with generic lists,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.