CmGetDeviceContainerMappedProperty
NTSTATUS __stdcall CmGetDeviceContainerMappedProperty(
HPNPCTX *hPnpCtx,
WCHAR *ContainerId,
VOID *ObjectBaseKey,
WCHAR *PropertyLocaleName,
_DEVPROPKEY *PropertyKey,
UINT64 *PropertyType,
UINT8 *PropertyBuffer,
UINT64 BufferSize,
UINT64 *PropertySize){
NTSTATUS v10;
unsigned int pid;
__int64 v13;
bool v14;
__int64 v15;
__int64 v16;
__int64 v17;
_DEVPROPKEY *v18;
UINT64 v19;
v10 = -1073741802;
*(_DWORD *)PropertySize = 0;
if( !PropertyLocaleName )
{
pid = PropertyKey->pid;
switch( pid )
{
case 'F':
v13 = *(_QWORD *)&PropertyKey->fmtid.Data1 - *(_QWORD *)&DEVPKEY_DeviceContainer_IsLocalMachine.fmtid.Data1;
if( *(_QWORD *)&PropertyKey->fmtid.Data1 == *(_QWORD *)&DEVPKEY_DeviceContainer_IsLocalMachine.fmtid.Data1 )
v13 = *(_QWORD *)PropertyKey->fmtid.Data4 - *(_QWORD *)DEVPKEY_DeviceContainer_IsLocalMachine.fmtid.Data4;
if( !v13 )
{
*(_DWORD *)PropertyType = 17;
*(_DWORD *)PropertySize = 1;
if( (_DWORD)BufferSize )
{
v14 = CmIsLocalMachineContainer(hPnpCtx, ContainerId) != 0;
v10 = 0;
*PropertyBuffer = -v14;
}
else
{
return -1073741789;
}
}
break;
case 'S':
v16 = *(_QWORD *)&PropertyKey->fmtid.Data1 - *(_QWORD *)&DEVPKEY_DeviceContainer_HasProblem.fmtid.Data1;
if( *(_QWORD *)&PropertyKey->fmtid.Data1 == *(_QWORD *)&DEVPKEY_DeviceContainer_HasProblem.fmtid.Data1 )
v16 = *(_QWORD *)PropertyKey->fmtid.Data4 - *(_QWORD *)DEVPKEY_DeviceContainer_HasProblem.fmtid.Data4;
if( !v16 )
{
v18 = (_DEVPROPKEY *)&DEVPKEY_Device_HasProblem;
goto LABEL_25;
}
break;
case '7':
v17 = *(_QWORD *)&PropertyKey->fmtid.Data1 - *(_QWORD *)&DEVPKEY_DeviceContainer_IsConnected.fmtid.Data1;
if( *(_QWORD *)&PropertyKey->fmtid.Data1 == *(_QWORD *)&DEVPKEY_DeviceContainer_IsConnected.fmtid.Data1 )
v17 = *(_QWORD *)PropertyKey->fmtid.Data4 - *(_QWORD *)DEVPKEY_DeviceContainer_IsConnected.fmtid.Data4;
if( !v17 )
{
v18 = (_DEVPROPKEY *)&DEVPKEY_Device_IsConnected;
goto LABEL_25;
}
break;
case 'l':
v15 = *(_QWORD *)&PropertyKey->fmtid.Data1 - *(_QWORD *)&DEVPKEY_DeviceContainer_IsRebootRequired.fmtid.Data1;
if( *(_QWORD *)&PropertyKey->fmtid.Data1 == *(_QWORD *)&DEVPKEY_DeviceContainer_IsRebootRequired.fmtid.Data1 )
v15 = *(_QWORD *)PropertyKey->fmtid.Data4 - *(_QWORD *)DEVPKEY_DeviceContainer_IsRebootRequired.fmtid.Data4;
if( !v15 )
{
v18 = (_DEVPROPKEY *)&DEVPKEY_Device_IsRebootRequired;
LABEL_25:
LODWORD(v19) = BufferSize;
return CmGetContainerBooleanProperty(
hPnpCtx,
ContainerId,
ObjectBaseKey,
v18,
PropertyType,
PropertyBuffer,
v19,
PropertySize);
}
break;
}
}
return v10;
}Referenced by:
PnpDispatchDeviceContainer