localspl: Implement InitializePrintMonitor (try 3)

Detlef Riekenberg wine.dev at web.de
Thu Oct 19 16:48:29 CDT 2006


As requested by Alexandre, a static variable is used.
> 
Changelog:
- localspl: Implement InitializePrintMonitor 

"-Wcast-qual" - save.


The Function-Pointers in mymonitorex will be filled later.


-- 
 
By by ... Detlef

-------------- next part --------------
Subject: [PATCH] localspl: Implement InitializePrintMonitor

---

 dlls/localspl/localmon.c      |   19 +++++++++++++------
 dlls/localspl/localspl_main.c |    1 -
 2 files changed, 13 insertions(+), 7 deletions(-)

86b9229c71fa602dc0f6ac07602b25014aeb11d3
diff --git a/dlls/localspl/localmon.c b/dlls/localspl/localmon.c
index 6665585..1af54c5 100644
--- a/dlls/localspl/localmon.c
+++ b/dlls/localspl/localmon.c
@@ -34,7 +34,6 @@
 #include "winspool.h"
 #include "ddk/winsplp.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 
@@ -53,18 +52,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(localspl);
  *  Failure: NULL
  *
  * NOTES
- *  Native localspl.dll fails, when the Section "Ports" is missing in "win.ini".
+ *  The fixed location "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports"
+ *  is used to store the Ports (IniFileMapping from "win.ini", Section "Ports").
+ *  Native localspl.dll fails, when no valid Port-Entry is present.
  *
  */
 
 LPMONITOREX WINAPI InitializePrintMonitor(LPWSTR regroot)
 {
-    FIXME("(%s) stub\n", debugstr_w(regroot));
+    static MONITOREX mymonitorex =
+    {
+        sizeof(MONITOREX) - sizeof(DWORD)
+    };
+
+    TRACE("(%s)\n", debugstr_w(regroot));
+    /* Parameter "regroot" is ignored on NT4.0 (localmon.dll) */
     if (!regroot || !regroot[0]) {
         SetLastError(ERROR_INVALID_PARAMETER);
         return NULL;
     }
-
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return NULL;
+    TRACE("=> %p\n", &mymonitorex);
+    /* Native windows returns always the same pointer on success */
+    return &mymonitorex;
 }
diff --git a/dlls/localspl/localspl_main.c b/dlls/localspl/localspl_main.c
index b1de446..b9ce877 100644
--- a/dlls/localspl/localspl_main.c
+++ b/dlls/localspl/localspl_main.c
@@ -34,7 +34,6 @@
 #include "winspool.h"
 #include "ddk/winsplp.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 
-- 
1.1.3


More information about the wine-patches mailing list