Re: PInvoke + Prevent Piracy

Benjamin Schwehn <[email protected]> Sun, 3 May 2009 19:36:48 +0200
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
> The method populates the structure. When I try to convert the
> structure pointer back to a managed type instance using
> Marshal.PtrToStructure,

If your problem is related to marshaling the certificate data,
have you tried using Marshal.Copy(IntPtr, byte[], Int32, Int32) on the 
bCertificate IntPtr into a managed byte[dwLength]? Or do you not succeed 
getting a WINCERTIFICATE struct from OUT LPWIN_CERTIFICATE Certificate?

Ben

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives