Louis Lenders : wbemprox: Add some properties of SoftwareLicensingProduct class.
Alexandre Julliard
julliard at winehq.org
Tue Apr 12 13:38:05 CDT 2022
Module: wine
Branch: oldstable
Commit: 188c86e5f3bf449cad69f2d9d1b16b6596675d9b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=188c86e5f3bf449cad69f2d9d1b16b6596675d9b
Author: Louis Lenders <xerox.xerox2000x at gmail.com>
Date: Wed Jan 19 12:43:07 2022 +0100
wbemprox: Add some properties of SoftwareLicensingProduct class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51163
Signed-off-by: Louis Lenders <xerox.xerox2000x at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit a9826b48e4c385ddce1d7913c41cdc652b8fbf06)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/wbemprox/builtin.c | 16 ++++++++++++++++
dlls/wbemprox/tests/query.c | 26 ++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index d5e935063ad..387ec442a67 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -378,6 +378,11 @@ static const struct column col_sid[] =
{ L"SID", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
{ L"SidLength", CIM_UINT32 },
};
+static const struct column col_softwarelicensingproduct[] =
+{
+ { L"LicenseIsAddon", CIM_BOOLEAN },
+ { L"LicenseStatus", CIM_UINT32 },
+};
static const struct column col_sounddevice[] =
{
{ L"DeviceID", CIM_STRING|COL_FLAG_DYNAMIC },
@@ -788,6 +793,11 @@ struct record_sid
const WCHAR *sid;
UINT32 sidlength;
};
+struct record_softwarelicensingproduct
+{
+ int license_is_addon;
+ UINT32 license_status;
+};
struct record_sounddevice
{
const WCHAR *deviceid;
@@ -930,6 +940,11 @@ static const struct record_quickfixengineering data_quickfixengineering[] =
{ L"http://winehq.org", L"KB1234567" },
};
+static const struct record_softwarelicensingproduct data_softwarelicensingproduct[] =
+{
+ { 0, 1 },
+};
+
static const struct record_stdregprov data_stdregprov[] =
{
{ reg_create_key, reg_enum_key, reg_enum_values, reg_get_stringvalue }
@@ -4043,6 +4058,7 @@ static struct table builtin_classes[] =
{ L"CIM_DataFile", C(col_datafile), 0, 0, NULL, fill_datafile },
{ L"CIM_LogicalDisk", C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
{ L"CIM_Processor", C(col_processor), 0, 0, NULL, fill_processor },
+ { L"SoftwareLicensingProduct", C(col_softwarelicensingproduct), D(data_softwarelicensingproduct) },
{ L"StdRegProv", C(col_stdregprov), D(data_stdregprov) },
{ L"SystemRestore", C(col_sysrestore), D(data_sysrestore) },
{ L"Win32_BIOS", C(col_bios), 0, 0, NULL, fill_bios },
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index 8d2ccc34efd..03e6a9904e7 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -1706,6 +1706,31 @@ static void test_Win32_WinSAT( IWbemServices *services )
SysFreeString( wql );
}
+static void test_SoftwareLicensingProduct( IWbemServices *services )
+{
+ BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM SoftwareLicensingProduct" );
+ IEnumWbemClassObject *result;
+ IWbemClassObject *obj;
+ HRESULT hr;
+ DWORD count;
+
+ hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
+ ok( hr == S_OK , "got %08x\n", hr );
+
+ for (;;)
+ {
+ hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
+ if (hr != S_OK) break;
+ check_property( obj, L"LicenseIsAddon", VT_BOOL, CIM_BOOLEAN );
+ check_property( obj, L"LicenseStatus", VT_I4, CIM_UINT32 );
+ IWbemClassObject_Release( obj );
+ }
+
+ IEnumWbemClassObject_Release( result );
+ SysFreeString( query );
+ SysFreeString( wql );
+}
+
static void test_Win32_DesktopMonitor( IWbemServices *services )
{
BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_DesktopMonitor" );
@@ -1959,6 +1984,7 @@ START_TEST(query)
test_select( services );
/* classes */
+ test_SoftwareLicensingProduct( services );
test_StdRegProv( services );
test_SystemSecurity( services );
test_Win32_Baseboard( services );
More information about the wine-cvs
mailing list