Announcements and discussion for PInvoke


Postby Sam Hobbs » Thu Feb 28, 2013 4:56 pm

I think the previous definition of the IMAGE_DOS_HEADER Structure will not work. I added an "unsafe" C# definition. The other one will not work because it uses "char" and since the data is ASCII the char will use 16 bytes. The unsafe version uses "fixed" which allows use when references are not allowed.

I do not know how to add a note explaining that the unsafe version will work in situations where the other one will not.
Sam Hobbs
Posts: 2
Joined: Tue Apr 13, 2010 2:33 am
Location: California

Postby Brian Donahue » Mon Mar 04, 2013 10:00 am

I suppose the best thing to do would be to put this under "Notes" for the function...
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to PInvoke.Net

Who is online

Users browsing this forum: Majestic-12 [Bot] and 0 guests