[DllImport("hid.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool HidD_GetAttributes(
SafeFileHandle HidDeviceObject,
ref HIDD_ATTRIBUTES Attributes);
[ StructLayout( LayoutKind.Sequential ) ]
public struct HIDD_ATTRIBUTES
{
public Int32 Size;
public Int16 VendorID;
public Int16 ProductID
public Int16 VersionNumber;
}
<StructLayout(LayoutKind.Sequential)> _
Public Structure HIDD_ATTRIBUTES
Public Size As Int32
Public VendorID As Int16
Public ProductID As Int16
Public VersionNumber As Int16
End Structure
HidDeviceObject [in]
Specifies an open handle to a top-level collection.
Attributes [out]
Pointer to a caller-allocated HIDD_ATTRIBUTES structure that returns the attributes of the collection specified by DeviceObject.
GetAttributes returns TRUE if succeeds; otherwise, it returns FALSE.
Do you know one? Please contribute it!
For C# - Must put "using Microsoft.Win32.SafeHandles;"
For VB - Must put "Imports Microsoft.Win32.SafeHandles"
Please add some!
Please add some!