Lucent Technologies USS-720 manual CloseHandle, 3 I/O File Functions continued, USB Device Driver

Models: USS-720

1 96
Download 96 pages 16.83 Kb
Page 66
Image 66

USS-720

Preliminary User Guide, Rev. 2

USB Device Driver

February 1999

 

 

3 I/O File Functions (continued)

3.4.5 Error Codes

ERROR_DEVICE_REMOVE—The device instance has been removed.

ERROR_DEVICE_STOP—The device instance has been stopped.

STATUS_INVALID_PARAMETER—Control Code is either invalid for this device instance or the device instance is in a state that cannot process the Control Code.

See specific Control Code for other errors (see Section 4 of this document).

3.5 CloseHandle

The CloseHandle I/O function closes an instance of a device and returns TRUE if the function is successful and FALSE if it fails. Details regarding the syntax, parameters, return values, and error codes are listed below.

3.5.1 Syntax

BOOL CloseHandle(

HANDLE hDev );

3.5.2 Parameters

Input:

hDev—Handle returned from a successful CreateFile.

Output:

None.

3.5.3 Return Values

If the function succeeds, the return value is TRUE (1).

If the function fails, the return value is FALSE (0). To get extended error information, call GetLastError.

3.5.4 Notes

See the Win32 SDK documentation for complete definitions.

3.5.5 Error Codes

See WIN32 SDK documentation for possible errors.

7-8

Lucent Technologies Inc.

Page 66
Image 66
Lucent Technologies USS-720 CloseHandle, 3 I/O File Functions continued, Preliminary User Guide, Rev, USB Device Driver