PnpRequestHwProfileChangeNotification
__int64 __fastcall PnpRequestHwProfileChangeNotification(VOID *Source1, int a2, _DWORD *a3, _UNICODE_STRING *a4){
__int64 result;
__int128 Object;
__int64 v10;
unsigned int v11;
v11 = 0;
v10 = 0i64;
Object = 0i64;
if( Source1 != &GUID_HWPROFILE_QUERY_CHANGE
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_QUERY_CHANGE, 16) != (_SIZE_T *)16
&& Source1 != &GUID_HWPROFILE_CHANGE_CANCELLED
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_CHANGE_CANCELLED, 16) != (_SIZE_T *)16
&& Source1 != &GUID_HWPROFILE_CHANGE_COMPLETE
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_CHANGE_COMPLETE, 16) != (_SIZE_T *)16 )
{
return 3221225488i64;
}
if( Source1 != &GUID_HWPROFILE_QUERY_CHANGE
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_QUERY_CHANGE, 16) != (_SIZE_T *)16 )
{
return PnpSetHwProfileChangeEvent((__int128 *)Source1, 0i64, 0i64, 0i64, 0i64);
}
if( a2 != 1 )
return PnpNotifyHwProfileChange(Source1, a3, a4);
KeInitializeEvent((INT64)&Object, 0, 0);
result = PnpSetHwProfileChangeEvent((__int128 *)Source1, (__int64)&Object, (__int64)&v11, (__int64)a3, (__int64)a4);
if( (int)result >= 0 )
{
KeWaitForSingleObject((UINT64)&Object, 0, 0, 0, 0i64);
return v11;
}
return result;
}Referenced by:
PpProfileCancelHardwareProfileTransition
PpProfileCancelTransitioningDock
PpProfileCommitTransitioningDock
PpProfileQueryHardwareProfileChange