PnpRequestHwProfileChangeNotification
__int64 __fastcall PnpRequestHwProfileChangeNotification(void *Source1, int a2, _DWORD *a3, struct _UNICODE_STRING *a4){
__int64 result;
struct _KEVENT Event;
INT64 CompletionStatus;
LODWORD(CompletionStatus) = 0;
memset(&Event, 0, sizeof(Event));
if( Source1 != &GUID_HWPROFILE_QUERY_CHANGE
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_QUERY_CHANGE, 0x10ui64) != 16
&& Source1 != &GUID_HWPROFILE_CHANGE_CANCELLED
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_CHANGE_CANCELLED, 0x10ui64) != 16
&& Source1 != &GUID_HWPROFILE_CHANGE_COMPLETE
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_CHANGE_COMPLETE, 0x10ui64) != 16 )
{
return 3221225488i64;
}
if( Source1 != &GUID_HWPROFILE_QUERY_CHANGE
&& RtlCompareMemory(Source1, &GUID_HWPROFILE_QUERY_CHANGE, 0x10ui64) != 16 )
{
return PnpSetHwProfileChangeEvent((const _GUID *)Source1, 0i64, 0i64, 0i64, 0i64);
}
if( a2 != 1 )
return PnpNotifyHwProfileChange((GUID *)Source1, (PNP_VETO_TYPE *)a3, a4);
KeInitializeEvent(&Event, NotificationEvent, 0);
result = PnpSetHwProfileChangeEvent((const _GUID *)Source1, &Event, &CompletionStatus, (_PNP_VETO_TYPE *)a3, a4);
if( (int)result >= 0 )
{
KeWaitForSingleObject(&Event, Executive, 0, 0, 0i64);
return(unsigned int)CompletionStatus;
}
return result;
}Referenced by:
PpProfileCancelHardwareProfileTransition
PpProfileCancelTransitioningDock
PpProfileCommitTransitioningDock
PpProfileQueryHardwareProfileChange