Author: ekohl
Date: Sun Feb 24 19:44:41 2013
New Revision: 58363
URL:
http://svn.reactos.org/svn/reactos?rev=58363&view=rev
Log:
[MSGINA]
- Implement WlxScreenSaverNotify. I decided to return a hardcoded FALSE because
RegQueryValueExW always reads "1", although there is a "0" written in
the registry. Will fix it later.
Modified:
trunk/reactos/dll/win32/msgina/msgina.c
trunk/reactos/dll/win32/msgina/msgina.h
trunk/reactos/dll/win32/msgina/stubs.c
Modified: trunk/reactos/dll/win32/msgina/msgina.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sun Feb 24 19:44:41 2013
@@ -184,6 +184,67 @@
ChooseGinaUI();
return pGinaUI->Initialize(pgContext);
+}
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+WlxScreenSaverNotify(
+ PVOID pWlxContext,
+ BOOL *pSecure)
+{
+#if 0
+ WCHAR szBuffer[2];
+ HKEY hKey;
+ DWORD bufferSize = sizeof(szBuffer);
+ DWORD varType = REG_SZ;
+ LONG rc;
+
+ TRACE("(%p %p)\n", pWlxContext, pSecure);
+
+ *pSecure = TRUE;
+
+ /*
+ * Policy setting:
+ * HKLM\Software\Policies\Microsoft\Windows\Control Panel\Desktop :
ScreenSaverIsSecure
+ * User setting:
+ * HKCU\Control Panel\Desktop : ScreenSaverIsSecure
+ */
+
+ rc = RegOpenKeyExW(HKEY_CURRENT_USER,
+ L"Control Panel\\Desktop",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ TRACE("RegOpenKeyExW: %ld\n", rc);
+ if (rc == ERROR_SUCCESS)
+ {
+ rc = RegQueryValueExW(hKey,
+ L"ScreenSaverIsSecure",
+ NULL,
+ &varType,
+ (LPBYTE)szBuffer,
+ &bufferSize);
+
+ TRACE("RegQueryValueExW: %ld\n", rc);
+
+ if (rc == ERROR_SUCCESS)
+ {
+ TRACE("szBuffer: \"%S\"\n", szBuffer);
+ *pSecure = _wtoi(szBuffer);
+ }
+
+ RegCloseKey(hKey);
+ }
+
+ TRACE("*pSecure: %ld\n", *pSecure);
+#endif
+
+ *pSecure = FALSE;
+
+ return TRUE;
}
/*
Modified: trunk/reactos/dll/win32/msgina/msgina.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] Sun Feb 24 19:44:41 2013
@@ -1,6 +1,7 @@
#define WIN32_NO_STATUS
#include <stdarg.h>
+#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <wincon.h>
Modified: trunk/reactos/dll/win32/msgina/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/stubs.c?r…
==============================================================================
--- trunk/reactos/dll/win32/msgina/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/stubs.c [iso-8859-1] Sun Feb 24 19:44:41 2013
@@ -86,23 +86,6 @@
* @unimplemented
*/
BOOL WINAPI
-WlxScreenSaverNotify(
- PVOID pWlxContext,
- BOOL *pSecure)
-{
- UNREFERENCED_PARAMETER(pWlxContext);
- UNREFERENCED_PARAMETER(pSecure);
-
- //HKLM\Software\Policies\Microsoft\Windows\Control Panel\Desktop : ScreenSaverIsSecure
- UNIMPLEMENTED;
- return TRUE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL WINAPI
WlxGetStatusMessage(
PVOID pWlxContext,
DWORD *pdwOptions,