PnpSetDeviceClassChange

NTSTATUS __stdcall PnpSetDeviceClassChange(GUID *EventGuid, GUID *ClassGuid, UNICODE_STRING *SymbolicLinkName){
  int v6; 
  _DWORD *DeviceEventEntry; 
  __int64 v8; 
  if( PnpShutdownEvent.Header.SignalState )
    return -1073741431;
  v6 = SymbolicLinkName->Length + 80;
  DeviceEventEntry = PnpCreateDeviceEventEntry((unsigned int)SymbolicLinkName->Length + 192);
  v8 = (__int64)DeviceEventEntry;
  if( !DeviceEventEntry )
    return -1073741801;
  *((GUID *)DeviceEventEntry + 7) = *EventGuid;
  DeviceEventEntry[32] = 2;
  DeviceEventEntry[37] = v6;
  *((GUID *)DeviceEventEntry + 10) = *ClassGuid;
  memmove((UINT8 *)DeviceEventEntry + 176, (UINT8 *)SymbolicLinkName->Buffer, SymbolicLinkName->Length);
  *(_WORD *)(v8 + 2 * ((unsigned __int64)SymbolicLinkName->Length >> 1) + 176) = 0;
  return PnpInsertEventInQueue(v8);
}

Referenced by:

IopProcessSetInterfaceState