Compartilhar via


LPGET_STRING (Windows CE 5.0)

Send Feedback

This function obtains a string from a HID device.

typedef DWORD (*LPGET_STRING) (  HID_HANDLE hDevice,  HID_STRING_TYPE stringType,  DWORD dwIdx,  LPWSTR pszBuffer,  DWORD cchBuffer,  PDWORD pcchActual);

Parameters

  • hDevice
    [in] Handle to a HID device.
  • stringType
    [in] String type to obtain. The HID_STRING_TYPE enumeration contains the types of strings.
  • dwIdx
    [in] Used when stringType is set to HID_STRING_INDEXED.
  • pszBuffer
    [in, out] Set to NULL to get the string's character count, and then add one for the NULL terminator. Otherwise, this is the buffer that stores the string obtained from the HID device.
  • cchBuffer
    [in] Number of characters that will fit into pszBuffer,**including the NULL terminator.
  • pcchActual
    [in] Number of characters in the string, not including the NULL terminator.

Return Values

The following table shows the possible return values.

Value Description
ERROR_GEN_FAILURE USB device information was not obtained.
ERROR_NOT_FOUND String type was not obtained because the specified string type does not exist.
ERROR_INVALID_PARAMETER String index was too large or an exception occurred when writing to the user's buffer.
ERROR_SUCCESS Function returned successfully.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Hiddi.h.

See Also

HID_STRING_TYPE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.