wbemprox: Add Win32_PageFileUsage class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52887 Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8f8b802e12
commit
3e35673b78
|
@ -260,6 +260,10 @@ static const struct column col_operatingsystem[] =
|
|||
{ L"TotalVisibleMemorySize", CIM_UINT64 },
|
||||
{ L"Version", CIM_STRING|COL_FLAG_DYNAMIC },
|
||||
};
|
||||
static const struct column col_pagefileusage[] =
|
||||
{
|
||||
{ L"Name", CIM_STRING },
|
||||
};
|
||||
static const struct column col_param[] =
|
||||
{
|
||||
{ L"Class", CIM_STRING },
|
||||
|
@ -687,6 +691,10 @@ struct record_operatingsystem
|
|||
UINT64 totalvisiblememorysize;
|
||||
const WCHAR *version;
|
||||
};
|
||||
struct record_pagefileusage
|
||||
{
|
||||
const WCHAR *name;
|
||||
};
|
||||
struct record_param
|
||||
{
|
||||
const WCHAR *class;
|
||||
|
@ -911,6 +919,10 @@ static const struct record_associator data_associator[] =
|
|||
{ L"Win32_DiskDriveToDiskPartition", L"Win32_DiskPartition", L"Win32_DiskDrive" },
|
||||
{ L"Win32_LogicalDiskToPartition", L"Win32_LogicalDisk", L"Win32_DiskPartition" },
|
||||
};
|
||||
static const struct record_pagefileusage data_pagefileusage[] =
|
||||
{
|
||||
{ L"c:\\pagefile.sys", },
|
||||
};
|
||||
static const struct record_param data_param[] =
|
||||
{
|
||||
{ L"__SystemSecurity", L"GetSD", -1, L"ReturnValue", CIM_UINT32 },
|
||||
|
@ -4148,6 +4160,7 @@ static struct table cimv2_builtin_classes[] =
|
|||
{ L"Win32_NetworkAdapter", C(col_networkadapter), 0, 0, NULL, fill_networkadapter },
|
||||
{ L"Win32_NetworkAdapterConfiguration", C(col_networkadapterconfig), 0, 0, NULL, fill_networkadapterconfig },
|
||||
{ L"Win32_OperatingSystem", C(col_operatingsystem), 0, 0, NULL, fill_operatingsystem },
|
||||
{ L"Win32_PageFileUsage", C(col_pagefileusage), D(data_pagefileusage) },
|
||||
{ L"Win32_PhysicalMedia", C(col_physicalmedia), D(data_physicalmedia) },
|
||||
{ L"Win32_PhysicalMemory", C(col_physicalmemory), 0, 0, NULL, fill_physicalmemory },
|
||||
{ L"Win32_PnPEntity", C(col_pnpentity), 0, 0, NULL, fill_pnpentity },
|
||||
|
|
|
@ -1475,6 +1475,31 @@ static void test_Win32_ComputerSystemProduct( IWbemServices *services )
|
|||
SysFreeString( wql );
|
||||
}
|
||||
|
||||
static void test_Win32_PageFileUsage( IWbemServices *services )
|
||||
{
|
||||
BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_PageFileUsage" );
|
||||
IEnumWbemClassObject *result;
|
||||
IWbemClassObject *obj;
|
||||
HRESULT hr;
|
||||
DWORD count;
|
||||
|
||||
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
|
||||
ok( hr == S_OK , "got %#lx\n", hr );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
||||
if (hr != S_OK) break;
|
||||
|
||||
check_property( obj, L"Name", VT_BSTR, CIM_STRING );
|
||||
IWbemClassObject_Release( obj );
|
||||
}
|
||||
|
||||
IEnumWbemClassObject_Release( result );
|
||||
SysFreeString( query );
|
||||
SysFreeString( wql );
|
||||
}
|
||||
|
||||
static void test_Win32_PhysicalMemory( IWbemServices *services )
|
||||
{
|
||||
BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_PhysicalMemory" );
|
||||
|
@ -2226,6 +2251,7 @@ START_TEST(query)
|
|||
test_Win32_NetworkAdapter( services );
|
||||
test_Win32_NetworkAdapterConfiguration( services );
|
||||
test_Win32_OperatingSystem( services );
|
||||
test_Win32_PageFileUsage( services );
|
||||
test_Win32_PhysicalMemory( services );
|
||||
test_Win32_PnPEntity( services );
|
||||
test_Win32_Printer( services );
|
||||
|
|
Loading…
Reference in New Issue