HidD_GetAttributes (hid)
Last changed: -50.76.241.205

.
Summary
The routine returns the attributes of a specified top-level collection.

C# Signature:

[DllImport("hid.dll", SetLastError=true)]
static extern Boolean HidD_GetAttributes(Handle DeviceObject, ref HIDD_ATTRIBUTES Attributes );

VB.NET Signature:

<DllImport("hid.dll", SetLastError:=True)> _
Public Shared Function HidD_GetAttributes(DeviceObject As Handle, out Attributes As HIDD_ATTRIBUTES) As Boolean
End Function

User-Defined Types:

HIDD_ATTRIBUTES Structure in C#:

[ StructLayout( LayoutKind.Sequential ) ]
public struct HIDD_ATTRIBUTES
{
    public Int32 Size;
    public Int16 VendorID;
    public Int16 ProductID;
    public Int16 VersionNumber;
}

HIDD_ATTRIBUTES Structure in VB:

<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

Parameters

HidDeviceObject [in]

    Specifies an open handle to a top-level collection.

Attributes [out]

    Pointer to a caller-allocated ATTRIBUTES structure that returns the attributes of the collection specified by DeviceObject.

Return Value

GetAttributes returns TRUE if succeeds; otherwise, it returns FALSE.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

For C# - Must put "using Microsoft.Win32.SafeHandles;"

For VB - Must put "Imports Microsoft.Win32.SafeHandles"

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation