[PATCH] slc: Add SLGetLicensingStatusInformation stub.

Andrey Gusev andrey.goosev at gmail.com
Thu Nov 22 12:43:30 CST 2018


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46172

Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
---
 dlls/slc/slc.c     |  8 ++++++++
 dlls/slc/slc.spec  |  2 +-
 include/slerror.h  |  1 +
 include/slpublic.h | 22 ++++++++++++++++++++++
 4 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/dlls/slc/slc.c b/dlls/slc/slc.c
index 7b7a6c6f77..ffecaa07bf 100644
--- a/dlls/slc/slc.c
+++ b/dlls/slc/slc.c
@@ -31,6 +31,14 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(slc);
 
+HRESULT WINAPI SLGetLicensingStatusInformation(HSLC handle, const SLID *app, const SLID *product,
+                                               LPCWSTR name, UINT *count, SL_LICENSING_STATUS **status)
+{
+    FIXME("(%p %p %p %s %p %p) stub\n", handle, app, product, debugstr_w(name), count, status );
+
+    return SL_E_RIGHT_NOT_CONSUMED;
+}
+
 HRESULT WINAPI SLGetWindowsInformation(LPCWSTR name, SLDATATYPE *type, UINT *val, LPBYTE *size)
 {
     FIXME("(%s %p %p %p) stub\n", debugstr_w(name), type, val, size );
diff --git a/dlls/slc/slc.spec b/dlls/slc/slc.spec
index e4289d3ae1..57e55728c1 100644
--- a/dlls/slc/slc.spec
+++ b/dlls/slc/slc.spec
@@ -16,7 +16,7 @@
 @ stub SLGetLicense
 @ stub SLGetLicenseFileId
 @ stub SLGetLicenseInformation
-@ stub SLGetLicensingStatusInformation
+@ stdcall SLGetLicensingStatusInformation(ptr ptr ptr wstr ptr ptr)
 @ stub SLGetPKeyId
 @ stub SLGetPKeyInformation
 @ stub SLGetPolicyInformation
diff --git a/include/slerror.h b/include/slerror.h
index 8b45d99901..4980a96e73 100644
--- a/include/slerror.h
+++ b/include/slerror.h
@@ -19,6 +19,7 @@
 #ifndef __WINE_SLERROR_H
 #define __WINE_SLERROR_H
 
+#define SL_E_RIGHT_NOT_CONSUMED       0xC004F002
 #define SL_E_VALUE_NOT_FOUND          0xC004F012
 #define SL_E_RIGHT_NOT_GRANTED        0xC004F013
 #define SL_E_DATATYPE_MISMATCHED      0xC004F01E
diff --git a/include/slpublic.h b/include/slpublic.h
index dc02f3ce08..97fa8c798c 100644
--- a/include/slpublic.h
+++ b/include/slpublic.h
@@ -29,6 +29,8 @@ extern "C" {
 #define SLCAPI DECLSPEC_IMPORT
 #endif
 
+typedef GUID SLID;
+
 typedef PVOID HSLC;
 
 typedef enum _tagSLDATATYPE
@@ -41,6 +43,26 @@ typedef enum _tagSLDATATYPE
     SL_DATA_SUM      = 100,
 } SLDATATYPE;
 
+typedef enum _tagSLLICENSINGSTATUS
+{
+    SL_LICENSING_STATUS_UNLICENSED,
+    SL_LICENSING_STATUS_LICENSED,
+    SL_LICENSING_STATUS_IN_GRACE_PERIOD,
+    SL_LICENSING_STATUS_NOTIFICATION,
+    SL_LICENSING_STATUS_LAST
+} SLLICENSINGSTATUS;
+
+typedef struct _tagSL_LICENSING_STATUS
+{
+    SLID SkuId;
+    SLLICENSINGSTATUS eStatus;
+    DWORD dwGraceTime;
+    DWORD dwTotalGraceDays;
+    HRESULT hrReason;
+    UINT64 qwValidityExpiration;
+} SL_LICENSING_STATUS;
+
+SLCAPI HRESULT WINAPI SLGetLicensingStatusInformation(HSLC, const SLID*, const SLID*, LPCWSTR, UINT*, SL_LICENSING_STATUS**);
 SLCAPI HRESULT WINAPI SLGetWindowsInformation(LPCWSTR, SLDATATYPE*, UINT*, LPBYTE*);
 SLCAPI HRESULT WINAPI SLGetWindowsInformationDWORD(LPCWSTR, LPDWORD);
 SLCAPI HRESULT WINAPI SLOpen(HSLC*);
-- 
2.17.2




More information about the wine-devel mailing list