Online Development Notebook > Index > ODN > USBm DLL Programming > DLL Commands > CloseDevice

CloseDevice


Description:

This is a USBm.dll function that closes access to a USB device.

 

Command Syntax:

true⁄false USBm_CloseDevice(device)

The USBm_CloseDevice function syntax has these parts:

Part Description
device Valid device from 0 to the maximum number of devices found (minus 1). Any other number results in a FALSE return.

 

Remarks:

Note: USBm_CloseDevice returns TRUE if the device successfully closes.

 

VB Declaration (USBmAPI.bas)

Public Declare Function USBm_CloseDevice _
    Lib "USBm.dll" _
        (ByVal device As Byte) _
    As Integer

 

VB Example

Dim result As Integer

    result = USBm_CloseDevice 3

This code fragment closes device number three. "Result" will contain TRUE or FALSE.

 

C Example

-TBD-


Hardware:  U401 USB Interface    U421 USB Interface
Programming:  USBm DLL Programming    Download Files
Application Notes:  U4x1 Application Notes    Misc Applications and Information    FAQ