471,350 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Marshal.PtrToStructure throws ArgumentException

In my application, C++ dll is posting some message,which is processed
by a form in C# ,where I use Message.Lparam to convert it in structure
using Marshal.PtrToStructure() mehtod ,but it throws ArgumentException.
can anybody give sample code for Marshal.PtrToStructure() .

Jan 26 '06 #1
1 3678
Make sure that layout of your structure is Sequential or Explicit

Jan 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by William Stacey | last post: by
5 posts views Thread by Daniel Brown | last post: by
3 posts views Thread by Tyron | last post: by
1 post views Thread by spamacon | last post: by

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.