42{
44
45 DPRINT(
"ProcessTargetDeviceEvent(%p)\n", PnpEvent);
46
47 if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus))
48 {
49
50
51 DPRINT(
"Device arrival: %S\n", PnpEvent->TargetDevice.DeviceIds);
52
53
54
55
56
57
58
60 }
61 else if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_EJECT_VETOED, &RpcStatus))
62 {
63 DPRINT1(
"Eject vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds);
64 }
65 else if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_KERNEL_INITIATED_EJECT, &RpcStatus))
66 {
67 DPRINT1(
"Kernel initiated eject: %S\n", PnpEvent->TargetDevice.DeviceIds);
68 }
69 else if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_SAFE_REMOVAL, &RpcStatus))
70 {
71
72
73 DPRINT1(
"Safe removal: %S\n", PnpEvent->TargetDevice.DeviceIds);
74
75
76
77
78
79
80
82 }
83 else if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_SURPRISE_REMOVAL, &RpcStatus))
84 {
85
86
87 DPRINT1(
"Surprise removal: %S\n", PnpEvent->TargetDevice.DeviceIds);
88
89
90
91
92
93
94
96 }
97 else if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_REMOVAL_VETOED, &RpcStatus))
98 {
99 DPRINT1(
"Removal vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds);
100 }
101 else if (
UuidEqual(&PnpEvent->EventGuid, (
UUID*)&GUID_DEVICE_REMOVE_PENDING, &RpcStatus))
102 {
103 DPRINT1(
"Removal pending: %S\n", PnpEvent->TargetDevice.DeviceIds);
104 }
105 else
106 {
107 DPRINT1(
"Unknown event, GUID {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n",
108 PnpEvent->EventGuid.Data1, PnpEvent->EventGuid.Data2, PnpEvent->EventGuid.Data3,
109 PnpEvent->EventGuid.Data4[0], PnpEvent->EventGuid.Data4[1], PnpEvent->EventGuid.Data4[2],
110 PnpEvent->EventGuid.Data4[3], PnpEvent->EventGuid.Data4[4], PnpEvent->EventGuid.Data4[5],
111 PnpEvent->EventGuid.Data4[6], PnpEvent->EventGuid.Data4[7]);
112 }
113}
int WINAPI UuidEqual(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)