K
Kerem Gümrükcü
Hi,
i am a little stuck here, how do i convert this from C Structure
to an structure in C# that can be marshalled:
typedef struct _DEV_BROADCAST_DEVICEINTERFACE {
DWORD dbcc_size;
DWORD dbcc_devicetype;
DWORD dbcc_reserved;
GUID dbcc_classguid;
TCHAR dbcc_name[1];
}
what to take for GUID and TCHAR[1]?
it is for RegisterDeviceNotification(...):
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient,
ref DEV_BROADCAST_DEVICEINTERFACE NotificationFilter,
uint Flags);
Is the PInvoke declaration ok?
Regards
Kerem
--
i am a little stuck here, how do i convert this from C Structure
to an structure in C# that can be marshalled:
typedef struct _DEV_BROADCAST_DEVICEINTERFACE {
DWORD dbcc_size;
DWORD dbcc_devicetype;
DWORD dbcc_reserved;
GUID dbcc_classguid;
TCHAR dbcc_name[1];
}
what to take for GUID and TCHAR[1]?
it is for RegisterDeviceNotification(...):
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient,
ref DEV_BROADCAST_DEVICEINTERFACE NotificationFilter,
uint Flags);
Is the PInvoke declaration ok?
Regards
Kerem
--