Device Function

Disconnect

dev_Disconnect()

Disconnect all layers in the device.

Syntax
#include "device.h"

LResult  dev_Disconnect
    (
         LDevice    device
    );
devicedevice to disconnect
Description

dev_Disconnect() disconnects each layer in the device from the top down.

Return Values

If successful, dev_Disconnect() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

dev_Connect()

Example
if (dataTransferDone)
{
    if ((result = dev_Disconnect(device)) < 0)
    {
        LOG("Disconnect failure", dev_ErrorMessage(result));
        dev_Reopen(device);
    }
}