Device Function

Close

dev_Close()

Close all layers in the device.

Syntax
#include "device.h"

LResult  dev_Close
    (
         LDevice    device
    );
devicedevice to
Description

dev_Close() closes all open layer services in the device. If not all layers are in the open state, dev_Close() will attach and/or reopen them. dev_Close() does not dispose of the device.

Return Values

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

See Also

dev_Dispose()
dev_Open()
dev_Reopen()

Example
if (!dev_IsConnected(device))
{
    dev_Close(device);
    dev_Dispose(device);
}