Description

Function will check if required USB device is attached to computer.

Availability

Protection method: USB
Application status: All
Required features: None

Declaration

Visual C/C++
extern "C" __declspec(dllimport) int __stdcall CheckForUsbDrive();
Visual Basic
Declare Function CheckForUsbDrive Lib "pcgint.dll" Alias "_CheckForUsbDrive@0" () As Long
Delphi
function CheckForUsbDrive():longint;stdcall; external 'pcgint.dll' name '_CheckForUsbDrive@0';
Delphi 64bit
function CheckForUsbDrive(): Int64; stdcall; external 'pcgint64.dll';

Parameters

None

Return values

If the function succeeds, PCGI_STATUS_OK is returned which means that required USB device is currently attached to computer.

If the function fails, return value is on of the following error codes:

PCGI_WINDOWS_SYSTEM_ERROR - Windows system error occurred.
PCGI_ERROR_USB_DRIVE_MISSING - Required USB device is currently not attach to computer.
PCGI_ERROR_WRONG_PROTECTION_METHOD - Application is not protected with USB protection method.

Full list of return codes is available here.