Desktop Functions: Smart Device Functions:
|
HidD_GetManufacturerString (hid)
C# Signature:
[DllImport("hid.dll", CharSet=CharSet.Auto, SetLastError=true)] VB Signature:
Declare Function HidD_GetManufacturerString Lib "hid.dll" (TODO) As TODO User-Defined Types:None. Alternative Managed API:Do you know one? Please contribute it! Notes:Note the use of CharSet.Auto in the DLL template. Tips & Tricks:Use of StringBuilder to create a variable to obtain the Manufacturer string instead of using MarshalAs. This approach is cleaner and doesn't require defining a Struct. Sample Code:StringBuilder manufacturerString = new StringBuilder(128); bool returnStatus = HidD_GetManufacturerString(hidHandle, manufacturerString, manufacturerString.Capacity); if (returnStatus) {
Console.WriteLine("Manufacturer name is {0}", manufacturerString.ToString()); } Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|