This allows Microsoft `OfficeSetup.exe` 365 to succeed again. It needs to be used with the revert described in https://bugs.winehq.org/show_bug.cgi?id=54667 . `OneDriveSetup.exe` crashes right after as before, but the Office 365 files get installed into the prefix.
-- v4: sppc: Stub SLInstallLicense(). sppc: Stub SLGetSLIDList().
From: Daniel Tang danielzgtg.opensource@gmail.com
--- dlls/sppc/sppc.c | 10 ++++++++++ dlls/sppc/sppc.spec | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/sppc/sppc.c b/dlls/sppc/sppc.c index 8819961d7c6..5fc3a87f03a 100644 --- a/dlls/sppc/sppc.c +++ b/dlls/sppc/sppc.c @@ -39,6 +39,16 @@ HRESULT WINAPI SLGetLicensingStatusInformation(HSLC handle, const SLID *app, con return SL_E_RIGHT_NOT_CONSUMED; }
+HRESULT WINAPI SLGetSLIDList(HSLC handle, UINT queryType, const SLID *query, UINT returnType, UINT *count, SLID **data) +{ + FIXME("(%p %u %p %u %p %p) stub\n", handle, queryType, query, returnType, count, data ); + + *count = 0; + *data = (SLID *)0xdeadbeef; + + return S_OK; +} + HRESULT WINAPI SLOpen(HSLC *handle) { FIXME("(%p) stub\n", handle ); diff --git a/dlls/sppc/sppc.spec b/dlls/sppc/sppc.spec index 6926d4d8b6d..97ab6a8f6ac 100644 --- a/dlls/sppc/sppc.spec +++ b/dlls/sppc/sppc.spec @@ -44,7 +44,7 @@ @ stub SLGetPolicyInformation @ stub SLGetPolicyInformationDWORD @ stub SLGetProductSkuInformation -@ stub SLGetSLIDList +@ stdcall SLGetSLIDList(ptr long ptr long ptr ptr) @ stub SLGetServiceInformation @ stub SLInstallLicense @ stub SLInstallProofOfPurchase
From: Daniel Tang danielzgtg.opensource@gmail.com
--- dlls/sppc/sppc.c | 12 ++++++++++++ dlls/sppc/sppc.spec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/sppc/sppc.c b/dlls/sppc/sppc.c index 5fc3a87f03a..2f171141d74 100644 --- a/dlls/sppc/sppc.c +++ b/dlls/sppc/sppc.c @@ -49,6 +49,18 @@ HRESULT WINAPI SLGetSLIDList(HSLC handle, UINT queryType, const SLID *query, UIN return S_OK; }
+HRESULT WINAPI SLInstallLicense(HSLC handle, UINT count, const BYTE *data, SLID *file) +{ + UINT i; + FIXME("(%p %u %p %p) stub\n", handle, count, data, file ); + + for (i = 0; i < count; i++) { + memset(&file[i], 0, sizeof(SLID)); + } + + return S_OK; +} + HRESULT WINAPI SLOpen(HSLC *handle) { FIXME("(%p) stub\n", handle ); diff --git a/dlls/sppc/sppc.spec b/dlls/sppc/sppc.spec index 97ab6a8f6ac..fd1462e3780 100644 --- a/dlls/sppc/sppc.spec +++ b/dlls/sppc/sppc.spec @@ -46,7 +46,7 @@ @ stub SLGetProductSkuInformation @ stdcall SLGetSLIDList(ptr long ptr long ptr ptr) @ stub SLGetServiceInformation -@ stub SLInstallLicense +@ stdcall SLInstallLicense(ptr long ptr ptr) @ stub SLInstallProofOfPurchase @ stub SLInstallProofOfPurchaseEx @ stub SLIsGenuineLocalEx
Daniel Tang commented on a discussion on include/slpublic.h:https://gitlab.winehq.org/wine/wine/-/merge_requests/2374#note_26709
} SL_LICENSING_STATUS;
SLCAPI HRESULT WINAPI SLGetLicensingStatusInformation(HSLC, const SLID*, const SLID*, LPCWSTR, UINT*, SL_LICENSING_STATUS**); +HRESULT WINAPI SLGetSLIDList(HSLC, UINT, const SLID *, UINT, UINT *, SLID **);
Sorry I didn't notice the SLCAPI part. But anyway, I saw some other functions not being added to this file, so I realized that it's not necessary either to add these two functions here either.
I think you are talking about SLPersistApplicationPolicies() and SLClose(), right? No, they should be added to the header file as well. Please feel free to add them by a separate commit in your MR by the way if you want.
Thanks
Jactry Zeng (@jactry) commented about dlls/sppc/sppc.c:
return SL_E_RIGHT_NOT_CONSUMED;
}
+HRESULT WINAPI SLGetSLIDList(HSLC handle, UINT queryType, const SLID *query, UINT returnType, UINT *count, SLID **data) +{
- FIXME("(%p %u %p %u %p %p) stub\n", handle, queryType, query, returnType, count, data );
Nitpick: here has an unnecessary space. And something similar happened in the following commit.
On Sat Mar 11 15:06:25 2023 +0000, Jactry Zeng wrote:
Nitpick: here has an unnecessary space. And something similar happened in the following commit.
I didn't originally want to add this space. I added it after seeing there was a final space in the other function in the original code. I will now remove the space in my new code.