Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pinvoke: Pointer to Pointer

11 views
Skip to first unread message

Curtis Newton

unread,
Feb 21, 2012, 6:18:06 AM2/21/12
to
Hallo,

ich habe hier in einer DLL folgendes:

typedef struct _DeviceKey
{
INT32 _serial;
void *_private;
} DeviceKey;

nebst dieser Funktion:

INT32 GetDeviceKeyListEntry(INT32 index, DeviceKey** device_key);

Mein Ansatz:

public class DeviceKey
{
Int32 _serial;
IntPtr _private;
};

[DllImport("My.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int GetDeviceKeyListEntry(Int32 index, out DeviceKey device_key);


Leider stürzt das Programm beim Aufruf ab. Wie mache ich es richtig?

C.
0 new messages