CmGetInterfaceClassMappedPropertyKeys
NTSTATUS __stdcall CmGetInterfaceClassMappedPropertyKeys(
HPNPCTX *hPnpCtx,
const WCHAR *ClassGuid,
VOID *ObjectBaseKey,
INT64 SkipPresenceCheck,
_DEVPROPKEY *PropertyKeys,
UINT64 BufferLength,
UINT64 *PropertyCount){
UINT64 *v7;
NTSTATUS result;
char v9;
char v10;
__int64 v11;
unsigned int v12;
int v13;
unsigned int v14;
int v15;
DEVPROPKEY **v16;
_DEVPROPKEY *v17;
char v18;
__int64 v19;
__int64 v20;
unsigned int v21;
int v22;
unsigned int v23;
UINT64 v24;
UINT64 PropertyType[9];
v7 = PropertyCount;
result = 0;
LODWORD(PropertyType[0]) = 0;
v9 = SkipPresenceCheck;
*(_DWORD *)PropertyCount = 0;
v10 = 0;
if( &DEVPKEY_DeviceInterfaceClass_DefaultInterface )
{
if( (_BYTE)SkipPresenceCheck )
goto LABEL_39;
LODWORD(v24) = 0;
result = CmGetInterfaceClassMappedPropertyFromRegValue(
hPnpCtx,
(WCHAR *)ClassGuid,
ObjectBaseKey,
(_DEVPROPKEY *)&DEVPKEY_DeviceInterfaceClass_DefaultInterface,
PropertyType,
0i64,
v24,
(UINT64 *)&PropertyCount);
if( result == -1073741789 || !result )
{
v10 = 1;
}
else if( result == -1073741772 )
{
LABEL_6:
*(_DWORD *)v7 = 0;
return result;
}
result = 0;
if( v10 )
{
LABEL_39:
if( PropertyKeys )
{
v11 = *(unsigned int *)v7;
if( (unsigned int)v11 < (unsigned int)BufferLength )
PropertyKeys[v11] = DEVPKEY_DeviceInterfaceClass_DefaultInterface;
}
v12 = *(_DWORD *)v7;
v13 = -1;
v14 = *(_DWORD *)v7 + 1;
if( v14 >= *(_DWORD *)v7 )
v13 = *(_DWORD *)v7 + 1;
*(_DWORD *)v7 = v13;
result = v14 < v12 ? 0xC0000095 : 0;
if( v14 < v12 )
*(_DWORD *)v7 = 0;
}
}
if( result >= 0 )
{
v15 = 0;
v16 = &off_140983808;
while( 1 )
{
v17 = *v16;
v18 = 0;
if( v9 )
goto LABEL_40;
LODWORD(v24) = 0;
result = CmGetInterfaceClassMappedPropertyFromComposite(
hPnpCtx,
(WCHAR *)ClassGuid,
ObjectBaseKey,
*v16,
PropertyType,
0i64,
v24,
(UINT64 *)&PropertyCount);
if( result == -1073741789 || !result )
{
v18 = 1;
}
else if( result == -1073741772 )
{
goto LABEL_6;
}
result = 0;
if( v18 )
{
LABEL_40:
if( PropertyKeys )
{
v19 = *(unsigned int *)v7;
if( (unsigned int)v19 < (unsigned int)BufferLength )
{
v20 = v19;
PropertyKeys[v20].fmtid = v17->fmtid;
PropertyKeys[v20].pid = v17->pid;
}
}
v21 = *(_DWORD *)v7;
v22 = -1;
v23 = *(_DWORD *)v7 + 1;
if( v23 >= *(_DWORD *)v7 )
v22 = *(_DWORD *)v7 + 1;
*(_DWORD *)v7 = v22;
result = v23 < v21 ? 0xC0000095 : 0;
if( v23 < v21 )
break;
}
++v15;
v16 += 2;
if( v15 )
goto LABEL_35;
}
*(_DWORD *)v7 = 0;
LABEL_35:
if( result >= 0 )
return(unsigned int)BufferLength < *(_DWORD *)v7 ? 0xC0000023 : 0;
}
return result;
}Referenced by:
CmDeleteInterfaceClassWorker
PnpDispatchInterfaceClass