Disables (and re-enables) a device from all access, and discards any data written to the device. When a device is disabled, it cannot be opened, and data cannot be read from the device. Use this function to disable logging to a database or printer.
The State argument is a toggle. A State of 1 disables the device(s), but you can then re-enable the device(s) by repeating the function with State = 0.
The device name, or * (asterisk) for all devices.
The disable state:
0 - Enable the device.
1 - Disable the device.
0 (zero) if successful, otherwise an error is returned.
! Disable the AlarmLog device.
DevDisable("AlarmLog",0); ! Re-enable the device.