# HidD\_GetAttributes

### C# Signature:

```cs
[DllImport("hid.dll", CharSet = CharSet.Auto, SetLastError = true)]
    static extern bool HidD_GetAttributes(
        SafeFileHandle HidDeviceObject,
        ref HIDD_ATTRIBUTES Attributes);
```

### HIDD\_ATTRIBUTES Structure in C#:

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

### HIDD\_ATTRIBUTES Structure in VB:

```cs
<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

```cs
Specifies an open handle to a top-level collection.
```

### Parameters

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pinvokeisalive.gitbook.io/pinvoke/desktopfunctions/hid/hidd_getattributes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
