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

Home Posts Topics Members FAQ

Woking with IntPtr, how can I copy with offset?

Hi,
I have to copy some data to an unmanaged array pointed by an IntPtr. The
thing is Marshal.Copy only offers 4 parameters(not the actual parameters
name but what I understood of them) : Source, srcOffset, Destination(the
IntPtr), Length.

I would need and offset in the destination, something like : Source,
srcOffset, Destination(the IntPtr), dstOffset, Length.

Is there a way I can handle that simply? because I can't just call
Marshal.Copy(Source, srcOffset, Destination+dstOffset, Length). It does not
work.

Does somebody know how to achieve that?

Thanks

ThunderMusic
Jan 5 '06 #1
1 2126
"ThunderMusic" <NO.danlat.at.hotmail.com.SPAM> schrieb:
I have to copy some data to an unmanaged array pointed by an IntPtr. The
thing is Marshal.Copy only offers 4 parameters(not the actual parameters
name but what I understood of them) : Source, srcOffset, Destination(the
IntPtr), Length.

I would need and offset in the destination, something like : Source,
srcOffset, Destination(the IntPtr), dstOffset, Length.

Is there a way I can handle that simply? because I can't just call
Marshal.Copy(Source, srcOffset, Destination+dstOffset, Length). It does
not work.


'...(..., New IntPtr(Destination + Offset), ...)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 5 '06 #2

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

Similar topics

0
by: Tien Pham via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Tien Pham I am having problems with intptr. Or maybe i am not using it properly. What it is that i am having problem with is...
1
by: Qingdong Z. | last post by:
How to copy from IntPtr to IntPtr in .NET? Marshal.Copy can't. I don't want to convert one of the IntPtr to managed byte array, because my application is live video related. It is CPU and Memory...
5
by: Robin Tucker | last post by:
I need to marshal an IntPtr (which I've got from GlobalLock of an HGLOBAL) into a byte array. I know the size of the array required and I've got a pointer to the blob, but I can't see how to copy...
0
by: Robin Tucker | last post by:
I have a structure returned from GetDisplayNameOf (function on IShellFolder interface), how can I get the String out of the pOleStr IntPtr? Function GetDisplayNameOf(ByVal pidl As IntPtr, ByVal...
0
by: Robin Tucker | last post by:
I have a structure returned from GetDisplayNameOf (function on IShellFolder interface), how can I get the String out of the pOleStr IntPtr? Function GetDisplayNameOf(ByVal pidl As IntPtr, ByVal...
6
by: Sushi | last post by:
I need to get a pointer of a variable... How can I get it ? for example: Dim a() as CStructure Dim z as System.IntPtr z = ?????? Sushi
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
1
by: ThunderMusic | last post by:
Hi, I have to copy some data to an unmanaged array pointed by an IntPtr. The thing is Marshal.Copy only offers 4 parameters(not the actual parameters name but what I understood of them) : Source,...
11
by: TheMadHatter | last post by:
yello... Assuming a 32bit system for this Q.. Is there any proformance differences between an *int vs IntPtr ?? I know that the IntPtr can be an Int32* or an Int64* (or more) depending on the...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
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
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
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.