PiSwDeviceInterfaceSetState
NTSTATUS __stdcall PiSwDeviceInterfaceSetState(
PI_SWD_OBJECT *SwDeviceObject,
PI_SWD_INTERFACE *Interface,
UINT8 Enable){
wchar_t *v3;
int v4;
__int64 v5;
__int64 v8;
int PWSTR;
WCHAR *v10;
INT64 v11;
_UNICODE_STRING DestinationString;
wchar_t *NtPathFormat;
v3 = 0i64;
NtPathFormat = 0i64;
v4 = 0;
DestinationString = 0i64;
v5 = *((_QWORD *)SwDeviceObject + 15);
if( !v5
|| (v8 = *(_QWORD *)(v5 + 64)) == 0
|| (*(_DWORD *)(v8 + 8) & 1) == 0
|| *((_BYTE *)Interface + 36) == Enable
|| (PWSTR = PnpAllocatePWSTR(*((WCHAR **)Interface + 2), 0x7FFFFFFFui64, 0x57706E50u, (PVOID *)&NtPathFormat),
v3 = NtPathFormat,
v4 = PWSTR,
PWSTR >= 0)
&& (v4 = CmSetDeviceInterfacePathFormat(v10, (UINT8)NtPathFormat), v4 >= 0)
&& (RtlInitUnicodeString(&DestinationString, v3),
v4 = IoSetDeviceInterfaceState((INT64)&DestinationString, Enable, v11),
v4 >= 0) )
{
*((_BYTE *)Interface + 36) = Enable;
}
if( v3 )
ExFreePoolWithTag(v3, 0x57706E50u);
return v4;
}Referenced by:
PiSwIrpInterfaceRegister
PiSwIrpInterfaceSetState