1 #ifndef _DBT_H 2 #define _DBT_H 3 4 #include "winuser.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 #define DBT_NO_DISK_SPACE 0x47 10 #define DBT_LOW_DISK_SPACE 0x0048 11 #define DBT_CONFIGMGPRIVATE 0x7FFF 12 #define DBT_DEVICEARRIVAL 0x8000 13 #define DBT_DEVICEQUERYREMOVE 0x8001 14 #define DBT_DEVICEQUERYREMOVEFAILED 0x8002 15 #define DBT_DEVICEREMOVEPENDING 0x8003 16 #define DBT_DEVICEREMOVECOMPLETE 0x8004 17 #define DBT_DEVICETYPESPECIFIC 0x8005 18 #define DBT_CUSTOMEVENT 0x8006 19 #define DBT_DEVTYP_OEM 0 20 #define DBT_DEVTYP_DEVNODE 1 21 #define DBT_DEVTYP_VOLUME 2 22 #define DBT_DEVTYP_PORT 3 23 #define DBT_DEVTYP_NET 4 24 #define DBT_DEVTYP_DEVICEINTERFACE 5 25 #define DBT_DEVTYP_HANDLE 6 26 #define DBT_APPYBEGIN 0 27 #define DBT_APPYEND 1 28 #define DBT_DEVNODES_CHANGED 7 29 #define DBT_QUERYCHANGECONFIG 0x17 30 #define DBT_CONFIGCHANGED 0x18 31 #define DBT_CONFIGCHANGECANCELED 0x19 32 #define DBT_MONITORCHANGE 0x1B 33 #define DBT_SHELLLOGGEDON 32 34 #define DBT_CONFIGMGAPI32 34 35 #define DBT_VXDINITCOMPLETE 35 36 #define DBT_VOLLOCKQUERYLOCK 0x8041 37 #define DBT_VOLLOCKLOCKTAKEN 0x8042 38 #define DBT_VOLLOCKLOCKFAILED 0x8043 39 #define DBT_VOLLOCKQUERYUNLOCK 0x8044 40 #define DBT_VOLLOCKLOCKRELEASED 0x8045 41 #define DBT_VOLLOCKUNLOCKFAILED 0x8046 42 #define DBT_USERDEFINED 0xFFFF 43 #define DBTF_MEDIA 1 44 #define DBTF_NET 2 45 46 /* Also defined in winuser.h */ 47 #define BSM_ALLCOMPONENTS 0 48 #define BSM_APPLICATIONS 8 49 #define BSM_ALLDESKTOPS 16 50 #define BSM_INSTALLABLEDRIVERS 4 51 #define BSM_NETDRIVER 2 52 #define BSM_VXDS 1 53 #define BSF_FLUSHDISK 0x00000004 54 #define BSF_FORCEIFHUNG 0x00000020 55 #define BSF_IGNORECURRENTTASK 0x00000002 56 #define BSF_NOHANG 0x00000008 57 #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040 58 #define BSF_POSTMESSAGE 0x00000010 59 #define BSF_QUERY 0x00000001 60 #if (_WIN32_WINNT >= 0x0500) 61 #define BSF_ALLOWSFW 0x00000080 62 #define BSF_SENDNOTIFYMESSAGE 0x00000100 63 #endif /* (_WIN32_WINNT >= 0x0500) */ 64 #if (_WIN32_WINNT >= 0x0501) 65 #define BSF_LUID 0x00000400 66 #define BSF_RETURNHDESK 0x00000200 67 #endif /* (_WIN32_WINNT >= 0x0501) */ 68 69 #define BSF_MSGSRV32ISOK_BIT 31 70 #define BSF_MSGSRV32ISOK 0x80000000 71 72 typedef struct _DEV_BROADCAST_HDR { 73 DWORD dbch_size; 74 DWORD dbch_devicetype; 75 DWORD dbch_reserved; 76 } DEV_BROADCAST_HDR,*PDEV_BROADCAST_HDR; 77 typedef struct _DEV_BROADCAST_OEM { 78 DWORD dbco_size; 79 DWORD dbco_devicetype; 80 DWORD dbco_reserved; 81 DWORD dbco_identifier; 82 DWORD dbco_suppfunc; 83 } DEV_BROADCAST_OEM,*PDEV_BROADCAST_OEM; 84 typedef struct _DEV_BROADCAST_PORT_A { 85 DWORD dbcp_size; 86 DWORD dbcp_devicetype; 87 DWORD dbcp_reserved; 88 char dbcp_name[1]; 89 } DEV_BROADCAST_PORT_A, *PDEV_BROADCAST_PORT_A; 90 typedef struct _DEV_BROADCAST_PORT_W { 91 DWORD dbcp_size; 92 DWORD dbcp_devicetype; 93 DWORD dbcp_reserved; 94 wchar_t dbcp_name[1]; 95 } DEV_BROADCAST_PORT_W, *PDEV_BROADCAST_PORT_W; 96 typedef struct _DEV_BROADCAST_USERDEFINED { 97 struct _DEV_BROADCAST_HDR dbud_dbh; 98 char dbud_szName[1]; 99 } DEV_BROADCAST_USERDEFINED; 100 typedef struct _DEV_BROADCAST_VOLUME { 101 DWORD dbcv_size; 102 DWORD dbcv_devicetype; 103 DWORD dbcv_reserved; 104 DWORD dbcv_unitmask; 105 WORD dbcv_flags; 106 } DEV_BROADCAST_VOLUME,*PDEV_BROADCAST_VOLUME; 107 typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A { 108 DWORD dbcc_size; 109 DWORD dbcc_devicetype; 110 DWORD dbcc_reserved; 111 GUID dbcc_classguid; 112 CHAR dbcc_name[1]; 113 } DEV_BROADCAST_DEVICEINTERFACE_A, *PDEV_BROADCAST_DEVICEINTERFACE_A; 114 typedef struct _DEV_BROADCAST_DEVICEINTERFACE_W { 115 DWORD dbcc_size; 116 DWORD dbcc_devicetype; 117 DWORD dbcc_reserved; 118 GUID dbcc_classguid; 119 WCHAR dbcc_name[1]; 120 } DEV_BROADCAST_DEVICEINTERFACE_W, *PDEV_BROADCAST_DEVICEINTERFACE_W; 121 typedef struct _DEV_BROADCAST_HANDLE { 122 DWORD dbch_size; 123 DWORD dbch_devicetype; 124 DWORD dbch_reserved; 125 HANDLE dbch_handle; 126 HDEVNOTIFY dbch_hdevnotify; 127 GUID dbch_eventguid; 128 LONG dbch_nameoffset; 129 BYTE dbch_data[1]; 130 } DEV_BROADCAST_HANDLE, *PDEV_BROADCAST_HANDLE; 131 132 #ifdef UNICODE 133 typedef DEV_BROADCAST_PORT_W DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT; 134 typedef DEV_BROADCAST_DEVICEINTERFACE_W DEV_BROADCAST_DEVICEINTERFACE, *PDEV_BROADCAST_DEVICEINTERFACE; 135 #else 136 typedef DEV_BROADCAST_PORT_A DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT; 137 typedef DEV_BROADCAST_DEVICEINTERFACE_A DEV_BROADCAST_DEVICEINTERFACE, *PDEV_BROADCAST_DEVICEINTERFACE; 138 #endif 139 140 #ifdef __cplusplus 141 } 142 #endif 143 #endif 144