<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Miscellaneous Functions > WLHardwareGetUsbNameAt |
The WLHardwareGetUsbNameAt function retrieves the drive name for a specific found USB drive on the system. You need to first call the function WLHardwareGetNumberUsbDrives to know the number of USB drives that were found on the system. After that, you have to iterate over all found USB drives calling the function WLHardwareGetUsbNameAt.
bool WLHardwareGetUsbNameAt( int Index, char_t* pUsbName ); |
function WLHardwareGetUsbNameAt( Index:Integer; pUsbName:PAnsiChar ):Boolean; stdcall; |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern bool WLHardwareGetUsbNameAt(int Index, StringBuilder HardwareId);
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLHardwareGetUsbNameAt(Index As Integer, ByRef HardwareId As String) As Boolean End Function |
Parameters
Index
[in] Index of the specific USB drive to retrieve the drive name
pHardwareId
[out] Pointer to a buffer that will receive a null-terminated UNICODE string with the drive name for the USB drive at the given position.
Return Values
If the function succeeds, the return value is True.
If the function fails, the return value is False.