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 / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Woking with IntPtr, how can I copy with offset?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ThunderMusic - 05 Jan 2006 17:55 GMT
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
Herfried K. Wagner [MVP] - 05 Jan 2006 17:59 GMT
"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
[quoted text clipped - 7 lines]
> Marshal.Copy(Source, srcOffset, Destination+dstOffset, Length). It does
> not work.

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

Signature

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


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.