Edit:
Por cierto, estoy utilizando ésto:
Código
using DWORD = UInt32; using HRESULT = Int32; using WORD = UInt16; using ULONG = UInt32; using HSERVICE = UInt16; using LPVOID = IntPtr; using LPBYTE = IntPtr; using REQUESTID = UInt32; using USHORT = UInt16; using BOOL = UInt32; using LPSTR = IntPtr; using BYTE = Byte; using CHAR = Byte; using DOUBLE = Double; using FLOAT = Single; using LONG = UInt32; using LONGLONG = UInt64; using SHORT = Int16; using UINT = UInt32; using ULONGLONG = UInt64;
Código
[StructLayout(LayoutKind.Explicit, Size = 268, CharSet = CharSet.Ansi)] public unsafe struct WFSIPMIMAGEREQUEST2 { [FieldOffset(0)]public WORD wImageSource; [FieldOffset(2)]public WORD wImageType; [FieldOffset(4)]public WORD wImageColorFormat; [FieldOffset(6)]public WORD wImageScanColor; [FieldOffset(8)]public LPVOID lpszImagePath; [FieldOffset(12)]public fixed char Value[256]; } [StructLayout(LayoutKind.Explicit, Size = 276, CharSet = CharSet.Ansi)] public unsafe struct WFSIPMREADIMAGEIN2 { [FieldOffset(0)]public USHORT usMediaID; [FieldOffset(2)]public WORD wCodelineFormat; [FieldOffset(4)]public WFSIPMIMAGEREQUEST2** lppImage; }
A WFSIPMREADIMAGEIN2 le puse 276 porque está en offset 4 + 268 de la otra estructura = 272 + 4 de otro index pero a null como terminador de los índices.
Por el cual el index 0 tendría toda la estructura y el index 1 sería igual a null.
Código
pero cuando hago:
Código
lpReadImageIn.lppImage[0]->wImageSource = 1;
Me muestra como mensaje de error: "Object reference not set to an instance of an object."
Cualquier aporte sería de gran ayuda, gracias.