case DBT_DEVICEARRIVAL: // system detected a new device
ListBox->Items->Add(S+"DBT_DEVICEARRIVAL");
break;
case DBT_DEVICEQUERYREMOVE: // wants to remove, may fail
ListBox->Items->Add(S+"DBT_DEVICEQUERYREMOVE");
break;
case DBT_DEVICEQUERYREMOVEFAILED: // removal aborted
ListBox->Items->Add(S+"DBT_DEVICEQUERYREMOVEFAILED");
break;
case DBT_DEVICEREMOVEPENDING: // about to remove, still avail.
ListBox->Items->Add(S+"DBT_DEVICEREMOVEPENDING");
break;
case DBT_DEVICEREMOVECOMPLETE: // device is gone
ListBox->Items->Add(S+"DBT_DEVICEREMOVECOMPLETE");
break;
case DBT_DEVICETYPESPECIFIC: // type specific event
ListBox->Items->Add(S+"DBT_DEVICETYPESPECIFIC");
break;
#if(WINVER >= 0x040A)
case DBT_CUSTOMEVENT: // user-defined event
ListBox->Items->Add(S+"DBT_CUSTOMEVENT");
break;
#endif /* WINVER >= 0x040A */
Event type. This parameter can be one of the following values:
Value Meaning
DBT_CONFIGCHANGECANCELED A request to change the current configuration (dock or undock) has been canceled.
DBT_CONFIGCHANGED The current configuration has changed, due to a dock or undock.
DBT_DEVICEARRIVAL A device has been inserted and is now available.
DBT_DEVICEQUERYREMOVE Permission is requested to remove a device. Any application can deny this request and cancel the removal.
DBT_DEVICEQUERYREMOVEFAILED A request to remove a device has been canceled.
DBT_DEVICEREMOVECOMPLETE A device has been removed.
DBT_DEVICEREMOVEPENDING A device is about to be removed. Cannot be denied.
DBT_DEVICETYPESPECIFIC A device-specific event has occurred.
DBT_QUERYCHANGECONFIG Permission is requested to change the current configuration (dock or undock).
DBT_USERDEFINED The meaning of this message is user-defined.
dwData
Address of a structure that contains event-specific data. Its meaning depends on the given event.