FilterConvertToString
NTSTATUS __stdcall FilterConvertToString(
UINT64 FilterLength,
_DEVPROP_FILTER_EXPRESSION *Filter,
UINT64 FilterStringSize,
WCHAR *FilterString,
UINT64 *RequiredSize){
WCHAR *v5;
unsigned int v6;
unsigned int v8;
unsigned int v9;
unsigned int v10;
int v11;
NTSTATUS result;
UINT64 v13;
v5 = FilterString;
v6 = FilterStringSize;
LODWORD(v13) = 0;
v8 = FilterLength;
v9 = FilterStringSize;
v10 = 2;
if( (unsigned int)FilterStringSize >= 2 )
*FilterString = 0;
v11 = 0;
if( (_DWORD)FilterLength )
{
while( 1 )
{
result = ExpressionConvertToString(&Filter[14 * v11], v6, v5, &v13);
if( (int)(result + 0x80000000) >= 0 && result != -1073741789 )
break;
if( v10 + (_DWORD)v13 - 2 < v10 )
return -1073741675;
v10 += v13 - 2;
if( v6 >= (unsigned __int64)(unsigned int)v13 - 2 )
{
v6 += 2 - v13;
v5 += ((unsigned __int64)(unsigned int)v13 - 2) >> 1;
}
if( ++v11 >= v8 )
goto LABEL_10;
}
}
else
{
LABEL_10:
result = 0;
if( RequiredSize )
*(_DWORD *)RequiredSize = v10;
if( v10 > v9 )
return -1073741789;
}
return result;
}Referenced by:
PiDqIrpQueryCreate