[PATCH 1/2] slc: Implement SLGetWindowsInformationDWORD

Detlef Riekenberg wine.dev at web.de
Wed Nov 3 17:12:54 CDT 2010


This let a vista games go a bit further

--
By by ... Detlef
---
 dlls/slc/slc.c     |   39 +++++++++++++++++++++++++++++++--------
 include/slerror.h  |    1 +
 include/slpublic.h |    2 +-
 3 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/dlls/slc/slc.c b/dlls/slc/slc.c
index e7416f1..8bd64dd 100644
--- a/dlls/slc/slc.c
+++ b/dlls/slc/slc.c
@@ -1,6 +1,7 @@
 /*
  *
  * Copyright 2008 Alistair Leslie-Hughes
+ * Copyright 2010 Detlef Riekenberg
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,15 +29,8 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(slc);
 
-DWORD WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue)
-{
-    FIXME("(%s) stub\n", debugstr_w(lpszValueName) );
-
-    return SL_E_RIGHT_NOT_GRANTED;
-}
-
 /***********************************************************************
- *             DllMain   (CLUSAPI.@)
+ * DllMain (slc.@)
  *
  */
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
@@ -51,3 +45,32 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     }
     return TRUE;
 }
+
+/***********************************************************************
+ * SLGetWindowsInformationDWORD (slc.@)
+ *
+ * check the license and return the value for the given name
+ *
+ * PARAMS
+ *  lpszValueName [i] application related value name to check
+ *  pdwValue      [o] ptr, where the value for the given name should be saved
+ *
+ * RETURNS
+ *  Success: S_OK
+ *  Failure: A HRESULT error code
+ *
+ */
+HRESULT WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue)
+{
+    FIXME("(%s, %p): semi-stub\n", debugstr_w(lpszValueName), pdwValue);
+
+    if (!lpszValueName || !pdwValue)
+        return E_INVALIDARG;
+
+    if (!*lpszValueName)
+        return SL_E_RIGHT_NOT_GRANTED;
+
+    /* We have always a genuine Wine */
+    *pdwValue = 1;
+    return S_OK;
+}
diff --git a/include/slerror.h b/include/slerror.h
index 9c800f6..8b45d99 100644
--- a/include/slerror.h
+++ b/include/slerror.h
@@ -19,6 +19,7 @@
 #ifndef __WINE_SLERROR_H
 #define __WINE_SLERROR_H
 
+#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 a2c6d42..177acdb 100644
--- a/include/slpublic.h
+++ b/include/slpublic.h
@@ -29,7 +29,7 @@ extern "C" {
 #define SLCAPI DECLSPEC_IMPORT
 #endif
 
-SLCAPI DWORD WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue);
+SLCAPI HRESULT WINAPI SLGetWindowsInformationDWORD(LPCWSTR, LPDWORD);
 
 
 #ifdef __cplusplus
-- 
1.7.1




More information about the wine-patches mailing list