[PATCH 0/1] MR9545: wbemprox: Add PartialProductKey and ApplicationId to SoftwareLicensingProduct class.
This fixes crashes in Codemeter (see https://bugs.winehq.org/show_bug.cgi?id=54455) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9545
From: Louis Lenders <xerox.xerox2000x(a)gmail.com> This fixes crashes in Codemeter (see https://bugs.winehq.org/show_bug.cgi?id=54455) --- dlls/wbemprox/builtin.c | 16 ++++++++++------ dlls/wbemprox/tests/query.c | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 3494a619bd6..a07240c0f76 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -491,9 +491,11 @@ static const struct column col_sid[] = }; static const struct column col_softwarelicensingproduct[] = { - { L"LicenseIsAddon", CIM_BOOLEAN }, - { L"LicenseStatus", CIM_UINT32 }, -}; + { L"ApplicationId", CIM_STRING }, + { L"LicenseIsAddon", CIM_BOOLEAN }, + { L"LicenseStatus", CIM_UINT32 }, + { L"PartialProductKey", CIM_STRING }, + }; static const struct column col_sounddevice[] = { { L"Caption", CIM_STRING }, @@ -1068,8 +1070,10 @@ struct record_sid }; struct record_softwarelicensingproduct { - int license_is_addon; - UINT32 license_status; + const WCHAR *application_id; + int license_is_addon; + UINT32 license_status; + const WCHAR *partial_product_key; }; struct record_sounddevice { @@ -1291,7 +1295,7 @@ static const struct record_quickfixengineering data_quickfixengineering[] = static const struct record_softwarelicensingproduct data_softwarelicensingproduct[] = { - { 0, 1 }, + { L"", 0, 1, NULL }, }; static const struct record_stdregprov data_stdregprov[] = diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index fddad243f41..6b872a34be9 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -2247,8 +2247,10 @@ static void test_SoftwareLicensingProduct( IWbemServices *services ) { hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count ); if (hr != S_OK) break; + check_property( obj, L"ApplicationId", VT_BSTR, CIM_STRING ); check_property( obj, L"LicenseIsAddon", VT_BOOL, CIM_BOOLEAN ); check_property( obj, L"LicenseStatus", VT_I4, CIM_UINT32 ); + check_property_nullable( obj, L"PartialProductKey", VT_BSTR, CIM_STRING ); IWbemClassObject_Release( obj ); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9545
Hans Leidekker (@hans) commented about dlls/wbemprox/builtin.c:
static const struct record_softwarelicensingproduct data_softwarelicensingproduct[] = { - { 0, 1 }, + { L"", 0, 1, NULL },
Let's add some data that matches native to avoid apps crashing later when they try to parse it: `{ L"55c92734-d682-4d71-983e-d6ec3f16059f", 0, 1, L"DEAD0" }` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9545#note_123260
participants (3)
-
Hans Leidekker (@hans) -
Louis Lenders -
Louis Lenders (@xe)