TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David
NA
1
0
Dereferencing an IntPtr from an array of doubles
Dec 15 2006 12:34 AM
Hello I am calling an unmanaged library that returns a pointer to an array of doubles. So what I have is an IntPtr doubleArrayPtr. If I want the i'th element in that array, would the correct call be, asuming a 32 bit CPU: IntPtr offsetPtr = doubleArrayPtr.ToInt32() + i * Marshal.Sizeof(typeof(Double)); Double myDouble = (Double)Marshal.PtrToStructure(offsetPtr, typeOf(Double));
Reply
Answers (
0
)
back ground woeker
VB.NET Crystal Reports