PnpDisableDevice
void __fastcall PnpDisableDevice(__int64 a1, const WCHAR *a2, INT64 a3){
int v3;
int v4;
v3 = *(_DWORD *)(a1 + 300);
v4 = (int)a2;
if( v3 >= 769 )
{
if( v3 <= 770 )
{
LABEL_7:
IopRemoveDevice(*(DEVICE_OBJECT **)(a1 + 32), 2ui64);
IopReleaseDeviceResources(a1, 1);
goto LABEL_8;
}
if( v3 <= 776 || v3 <= 781 )
{
if( PiIrpQueryRemoveDevice(*(DEVICE_OBJECT **)(a1 + 32), 0i64) < 0 )
{
IopRemoveDevice(*(DEVICE_OBJECT **)(a1 + 32), 3ui64);
goto LABEL_8;
}
goto LABEL_7;
}
}
LABEL_8:
if( (*(_DWORD *)(a1 + 396) & 0x6000) != 0 )
PipClearDevNodeProblem(a1, a2, a3);
PipSetDevNodeProblem(a1, v4, 0);
}Referenced by:
PiProcessNewDeviceNode
PnpIsDeviceInstanceEnabled