dev_Detach()
Detaches all layers in the device.
#include "device.h" LResult dev_Detach ( LDevice device );
device | device to |
dev_Detach() attempts to detach all layers in a device. dev_Detach() does not detach from the top layer unless it is a multiplex layer. If it is not a multiplex layer, it is the layer through which data will be read and written.
If successful, dev_Detach() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if ((result = dev_Connect(device)) < 0) { LOG("Connect failure", dev_ErrorMessage(result)); } else { if ((result = dev_Detach(device)) < 0) { LOG("Detach failure", dev_ErrorMessage(result)); } }