Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ListExtensions(out int pCount, System.IntPtr pExtensions)
- public struct ExtensionId
- {
- public ExtensionGuid data;
- }
- public struct ExtensionGuid
- {
- public int Data1;
- public short Data2;
- public short Data3;
- public byte[] Data4;
- }
- ExtensionId *ids = new ExtensionId[10];
- ExtensionId[] ids = new ExtensionId[10];
- GCHandle handle = GCHandle.Alloc(ids);
- IntPtr ptr = (IntPtr)handle;
- int pCount;
- ListExtensions(out pCount, ptr);
- ExtensionId[] result = (ExtensionId[])handle.Target;
- The runtime has encountered a fatal error. The address of the error was at 0x73d87e37, on thread 0x5f8. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement