Device.onDeviceReset event
The onDeviceReset event occurs when the device is about to reset.
Syntax
Device.onDeviceReset()
Parameters
This event has no parameters.
Return value
This event does not return a value.
Examples
The following JScript example shows how to set an event handler for the onDeviceReset event.
// Event handler for onDeviceReset.
function HandleDeviceReset()
{
Alert("onDeviceReset Event Handler: Device about to reset.");
}
// Set the event handler.
try
{
deviceObject.onDeviceReset = HandleDeviceReset;
}
catch(e)
{
Alert("Device object does not support onDeviceReset");
}
//
// Reset device
//
// Clear the event handler.
deviceObject.onDeviceReset = null;
Requirements
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |