- Add my proposed directory tree for the components involved in printing.
authorColin Finck <colin@reactos.org>
Mon, 4 May 2015 13:21:13 +0000 (13:21 +0000)
committerColin Finck <colin@reactos.org>
Mon, 4 May 2015 13:21:13 +0000 (13:21 +0000)
- Remove some Wine-imported components which are either entirely not usable for us or only implement so few functions that it's easier to completely reimplement them.
- Move "localui" (Wine-imported) and "spoolsv" (ReactOS stub) to the new directories.

svn path=/branches/colins-printing-for-freedom/; revision=67543

100 files changed:
reactos/base/applications/cmdutils/CMakeLists.txt
reactos/base/applications/cmdutils/print/.gitignore [new file with mode: 0644]
reactos/base/services/CMakeLists.txt
reactos/dll/win32/CMakeLists.txt
reactos/dll/win32/localspl/CMakeLists.txt [deleted file]
reactos/dll/win32/localspl/lang/spl_Cy.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Da.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_De.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_En.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Es.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Fr.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_He.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Hu.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_It.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Ja.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Ko.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Lt.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Nl.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_No.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Pl.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Pt.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Ro.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Ru.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Si.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Sq.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Sv.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Tr.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Uk.rc [deleted file]
reactos/dll/win32/localspl/lang/spl_Zh.rc [deleted file]
reactos/dll/win32/localspl/localmon.c [deleted file]
reactos/dll/win32/localspl/localspl.rc [deleted file]
reactos/dll/win32/localspl/localspl.spec [deleted file]
reactos/dll/win32/localspl/localspl_main.c [deleted file]
reactos/dll/win32/localspl/localspl_private.h [deleted file]
reactos/dll/win32/localspl/provider.c [deleted file]
reactos/dll/win32/localspl/resource.h [deleted file]
reactos/dll/win32/spoolss/CMakeLists.txt [deleted file]
reactos/dll/win32/spoolss/router.c [deleted file]
reactos/dll/win32/spoolss/spoolss.h [deleted file]
reactos/dll/win32/spoolss/spoolss.spec [deleted file]
reactos/dll/win32/spoolss/spoolss_main.c [deleted file]
reactos/dll/win32/winspool/CMakeLists.txt [deleted file]
reactos/dll/win32/winspool/info.c [deleted file]
reactos/dll/win32/winspool/precomp.h [deleted file]
reactos/dll/win32/winspool/stubs.c [deleted file]
reactos/dll/win32/winspool/winspool.rc [deleted file]
reactos/dll/win32/winspool/winspool.spec [deleted file]
reactos/win32ss/CMakeLists.txt
reactos/win32ss/printing/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/base/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/base/printui/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/base/spoolss/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/base/spoolsv/CMakeLists.txt [moved from reactos/base/services/spoolsv/CMakeLists.txt with 100% similarity]
reactos/win32ss/printing/base/spoolsv/spoolsv.c [moved from reactos/base/services/spoolsv/spoolsv.c with 100% similarity]
reactos/win32ss/printing/base/spoolsv/spoolsv.rc [moved from reactos/base/services/spoolsv/spoolsv.rc with 100% similarity]
reactos/win32ss/printing/base/winspool/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/drivers/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/drivers/tty/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/drivers/unidrv/res/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/drivers/unidrv/ui/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/monitors/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/monitors/localmon/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/monitors/localmon/ui/CMakeLists.txt [moved from reactos/dll/win32/localui/CMakeLists.txt with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Da.rc [moved from reactos/dll/win32/localui/lang/ui_Da.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_De.rc [moved from reactos/dll/win32/localui/lang/ui_De.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_En.rc [moved from reactos/dll/win32/localui/lang/ui_En.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Es.rc [moved from reactos/dll/win32/localui/lang/ui_Es.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Fr.rc [moved from reactos/dll/win32/localui/lang/ui_Fr.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_He.rc [moved from reactos/dll/win32/localui/lang/ui_He.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Hu.rc [moved from reactos/dll/win32/localui/lang/ui_Hu.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_It.rc [moved from reactos/dll/win32/localui/lang/ui_It.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Ja.rc [moved from reactos/dll/win32/localui/lang/ui_Ja.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Ko.rc [moved from reactos/dll/win32/localui/lang/ui_Ko.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Lt.rc [moved from reactos/dll/win32/localui/lang/ui_Lt.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Nl.rc [moved from reactos/dll/win32/localui/lang/ui_Nl.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_No.rc [moved from reactos/dll/win32/localui/lang/ui_No.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Pl.rc [moved from reactos/dll/win32/localui/lang/ui_Pl.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Pt.rc [moved from reactos/dll/win32/localui/lang/ui_Pt.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Ro.rc [moved from reactos/dll/win32/localui/lang/ui_Ro.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Ru.rc [moved from reactos/dll/win32/localui/lang/ui_Ru.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Si.rc [moved from reactos/dll/win32/localui/lang/ui_Si.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Sq.rc [moved from reactos/dll/win32/localui/lang/ui_Sq.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Sv.rc [moved from reactos/dll/win32/localui/lang/ui_Sv.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Tr.rc [moved from reactos/dll/win32/localui/lang/ui_Tr.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Uk.rc [moved from reactos/dll/win32/localui/lang/ui_Uk.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/lang/ui_Zh.rc [moved from reactos/dll/win32/localui/lang/ui_Zh.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/localui.c [moved from reactos/dll/win32/localui/localui.c with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/localui.h [moved from reactos/dll/win32/localui/localui.h with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/localui.rc [moved from reactos/dll/win32/localui/localui.rc with 100% similarity]
reactos/win32ss/printing/monitors/localmon/ui/localui.spec [moved from reactos/dll/win32/localui/localui.spec with 100% similarity]
reactos/win32ss/printing/monitors/pjlmon/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/monitors/tcpmon/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/monitors/tcpmon/ui/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/monitors/usbmon/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/processors/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/processors/winprint/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/providers/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/printing/providers/inetpp/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/providers/localspl/.gitignore [new file with mode: 0644]
reactos/win32ss/printing/providers/win32spl/.gitignore [new file with mode: 0644]

index 782baed..9109ab1 100644 (file)
@@ -8,6 +8,7 @@ add_subdirectory(hostname)
 add_subdirectory(lodctr)
 add_subdirectory(mode)
 add_subdirectory(more)
+#add_subdirectory(print)
 add_subdirectory(reg)
 add_subdirectory(sort)
 add_subdirectory(taskkill)
diff --git a/reactos/base/applications/cmdutils/print/.gitignore b/reactos/base/applications/cmdutils/print/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
index e909cfa..673cbb4 100644 (file)
@@ -3,7 +3,6 @@ add_subdirectory(audiosrv)
 add_subdirectory(eventlog)
 add_subdirectory(rpcss)
 add_subdirectory(schedsvc)
-add_subdirectory(spoolsv)
 add_subdirectory(srvsvc)
 add_subdirectory(svchost)
 add_subdirectory(tcpsvcs)
index 18902ff..8912eb0 100644 (file)
@@ -71,8 +71,6 @@ add_subdirectory(jsproxy)
 add_subdirectory(kernel32)
 add_subdirectory(kernel32_vista)
 add_subdirectory(loadperf)
-add_subdirectory(localspl)
-add_subdirectory(localui)
 add_subdirectory(lpk)
 add_subdirectory(lsasrv)
 add_subdirectory(lz32)
@@ -192,7 +190,6 @@ add_subdirectory(smdll)
 add_subdirectory(sndblst)
 add_subdirectory(snmpapi)
 add_subdirectory(softpub)
-add_subdirectory(spoolss)
 add_subdirectory(srclient)
 add_subdirectory(stdole2.tlb)
 add_subdirectory(stdole32.tlb)
@@ -233,7 +230,6 @@ add_subdirectory(winhttp)
 add_subdirectory(wininet)
 add_subdirectory(winmm)
 add_subdirectory(winscard)
-add_subdirectory(winspool)
 add_subdirectory(winsta)
 add_subdirectory(wintrust)
 add_subdirectory(wlanapi)
diff --git a/reactos/dll/win32/localspl/CMakeLists.txt b/reactos/dll/win32/localspl/CMakeLists.txt
deleted file mode 100644 (file)
index 92e8807..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-add_definitions(-D__WINESRC__)
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-spec2def(localspl.dll localspl.spec)
-
-list(APPEND SOURCE
-    localmon.c
-    localspl_main.c
-    provider.c
-    localspl_private.h)
-
-add_library(localspl SHARED
-    ${SOURCE}
-    localspl.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/localspl_stubs.c
-    ${CMAKE_CURRENT_BINARY_DIR}/localspl.def)
-
-set_module_type(localspl win32dll)
-target_link_libraries(localspl wine)
-add_importlibs(localspl spoolss user32 advapi32 shlwapi msvcrt kernel32 ntdll)
-add_pch(localspl localspl_private.h SOURCE)
-add_cd_file(TARGET localspl DESTINATION reactos/system32 FOR all)
diff --git a/reactos/dll/win32/localspl/lang/spl_Cy.rc b/reactos/dll/win32/localspl/lang/spl_Cy.rc
deleted file mode 100644 (file)
index ecae600..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Cefnogaeth iaith Cymraeg
- * Welsh language support
- *
- * Copyright 2010 Ken Sharp
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_WELSH, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Port Lleol"
-    IDS_LOCALMONITOR "Monitor Lleol"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Da.rc b/reactos/dll/win32/localspl/lang/spl_Da.rc
deleted file mode 100644 (file)
index 2872fa4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Danish resources for localspl
- *
- * Copyright 2008 Jens Albretsen <jens@albretsen.dk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Lokal port"
-    IDS_LOCALMONITOR "Lokal overvåger"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_De.rc b/reactos/dll/win32/localspl/lang/spl_De.rc
deleted file mode 100644 (file)
index 29191bd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * German resources for localspl
- *
- * Copyright 2005 Henning Gerhardt
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#pragma code_page(65001)
-
-LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Lokaler Anschluss"
-    IDS_LOCALMONITOR "Lokale Anzeige"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_En.rc b/reactos/dll/win32/localspl/lang/spl_En.rc
deleted file mode 100644 (file)
index 4052cb7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * English resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Local Port"
-    IDS_LOCALMONITOR "Local Monitor"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Es.rc b/reactos/dll/win32/localspl/lang/spl_Es.rc
deleted file mode 100644 (file)
index 3ae4b22..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Spanish resources for localspl
- *
- * Copyright 2010 José Manuel Ferrer Ortiz
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Puerto local"
-    IDS_LOCALMONITOR "Monitor local"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Fr.rc b/reactos/dll/win32/localspl/lang/spl_Fr.rc
deleted file mode 100644 (file)
index 5aee221..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * French resources for localspl
- *
- * Copyright 2007 Jonathan Ernst
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Port local"
-    IDS_LOCALMONITOR "Moniteur local"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_He.rc b/reactos/dll/win32/localspl/lang/spl_He.rc
deleted file mode 100644 (file)
index a93e293..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Hebrew resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- *
- * Translated by Baruch Rutman
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "יציאה מקומית"
-    IDS_LOCALMONITOR "ניטור מקומי"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Hu.rc b/reactos/dll/win32/localspl/lang/spl_Hu.rc
deleted file mode 100644 (file)
index 5bb4422..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Hungarian resources for localspl
- *
- * Copyright 2010 Andras Kovacs
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Helyi Port"
-    IDS_LOCALMONITOR "Helyi figyelő"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_It.rc b/reactos/dll/win32/localspl/lang/spl_It.rc
deleted file mode 100644 (file)
index 80fad14..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Italian resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Porta locale"
-    IDS_LOCALMONITOR "Schermo locale"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Ja.rc b/reactos/dll/win32/localspl/lang/spl_Ja.rc
deleted file mode 100644 (file)
index 2e4ecf7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Japanese resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "ローカル ポート"
-    IDS_LOCALMONITOR "ローカル モニタ"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Ko.rc b/reactos/dll/win32/localspl/lang/spl_Ko.rc
deleted file mode 100644 (file)
index f4c7e54..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Korean  resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- * Copyright 2006 YunSong Hwang
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "지역 포트"
-    IDS_LOCALMONITOR "지역 모니터"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Lt.rc b/reactos/dll/win32/localspl/lang/spl_Lt.rc
deleted file mode 100644 (file)
index 2b242cd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Lithuanian resources for localspl
- *
- * Copyright 2009 Aurimas Fišeras <aurimas@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Vietinis prievadas"
-    IDS_LOCALMONITOR "Vietinis monitorius"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Nl.rc b/reactos/dll/win32/localspl/lang/spl_Nl.rc
deleted file mode 100644 (file)
index ae46424..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Dutch resources for localspl
- *
- * Copyright 2008 Frans Kool
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Lokale Poort"
-    IDS_LOCALMONITOR "Lokale Monitor"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_No.rc b/reactos/dll/win32/localspl/lang/spl_No.rc
deleted file mode 100644 (file)
index 44ea1d9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Norwegian Bokmål resources for localspl
- *
- * Copyright 2006 Alexander N. Sørnes <alex@thehandofagony.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Lokal port"
-    IDS_LOCALMONITOR "Lokal overvåker"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Pl.rc b/reactos/dll/win32/localspl/lang/spl_Pl.rc
deleted file mode 100644 (file)
index bd7908c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Polish resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- * Copyright 2007 Mikolaj Zalewski
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Port lokalny"
-    IDS_LOCALMONITOR "Monitor lokalny"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Pt.rc b/reactos/dll/win32/localspl/lang/spl_Pt.rc
deleted file mode 100644 (file)
index 2675843..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Portuguese resources for localspl
- *
- * Copyright 2008 Ricardo Filipe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Porta local"
-    IDS_LOCALMONITOR "Monitor Local"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Ro.rc b/reactos/dll/win32/localspl/lang/spl_Ro.rc
deleted file mode 100644 (file)
index bfd44f0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- * Copyright 2008 Michael Stefaniuc
- *           2011 Fulea Ștefan
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#pragma code_page(65001)
-
-LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Port local"
-    IDS_LOCALMONITOR "Ecran local"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Ru.rc b/reactos/dll/win32/localspl/lang/spl_Ru.rc
deleted file mode 100644 (file)
index 50b3d7b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Russian resources for localspl
- *
- * Copyright 2008 Vitaliy Margolen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Локальный порт"
-    IDS_LOCALMONITOR "Локальный монитор"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Si.rc b/reactos/dll/win32/localspl/lang/spl_Si.rc
deleted file mode 100644 (file)
index 32d7aff..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Slovenian resources for localspl
- *
- * Copyright 2008 Rok Mandeljc
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#pragma code_page(65001)
-
-LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Lokalna vrata"
-    IDS_LOCALMONITOR "Lokalen monitor"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Sq.rc b/reactos/dll/win32/localspl/lang/spl_Sq.rc
deleted file mode 100644 (file)
index e917866..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * English resources for localspl
- *
- * Copyright 2005 Huw Davies
- * Copyright 2006 Detlef Riekenberg
- * Translation: Ardit Dani (ALbanian Translation Resource File)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Porti Vendor"
-    IDS_LOCALMONITOR "Monitorim Vendor"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Sv.rc b/reactos/dll/win32/localspl/lang/spl_Sv.rc
deleted file mode 100644 (file)
index afa6434..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Swedish resources for localspl
- *
- * Copyright 2007 Daniel Nylander
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Lokal port"
-    IDS_LOCALMONITOR "Lokal skärm"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Tr.rc b/reactos/dll/win32/localspl/lang/spl_Tr.rc
deleted file mode 100644 (file)
index 2a9f96f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Turkish resources for localspl
- *
- * Copyright: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Yerli Giriş"
-    IDS_LOCALMONITOR "Yerli İzleyici"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Uk.rc b/reactos/dll/win32/localspl/lang/spl_Uk.rc
deleted file mode 100644 (file)
index 4b0ea3f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Ukrainian resources for localspl
- *
- * Copyright 2010 Igor Paliychuk
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "Локальний порт"
-    IDS_LOCALMONITOR "Локальний монітор"
-}
diff --git a/reactos/dll/win32/localspl/lang/spl_Zh.rc b/reactos/dll/win32/localspl/lang/spl_Zh.rc
deleted file mode 100644 (file)
index 2e2f54f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * localspl (Simplified and Traditional Chinese Resources)
- *
- * Copyright 2008 Hongbo Ni <hongbo.at.njstar.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* Chinese text is encoded in UTF-8 */
-#pragma code_page(65001)
-
-LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "本地端口"
-    IDS_LOCALMONITOR "本地监视器"
-}
-
-LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
-
-STRINGTABLE
-{
-    IDS_LOCALPORT "本地端口"
-    IDS_LOCALMONITOR "本地監視器"
-}
diff --git a/reactos/dll/win32/localspl/localmon.c b/reactos/dll/win32/localspl/localmon.c
deleted file mode 100644 (file)
index e78b612..0000000
+++ /dev/null
@@ -1,793 +0,0 @@
-/*
- * Implementation of the Local Printmonitor
- *
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "localspl_private.h"
-
-#include "resource.h"
-
-/*****************************************************/
-
-static CRITICAL_SECTION port_handles_cs;
-static CRITICAL_SECTION_DEBUG port_handles_cs_debug =
-{
-    0, 0, &port_handles_cs,
-    { &port_handles_cs_debug.ProcessLocksList, &port_handles_cs_debug.ProcessLocksList },
-      0, 0, { (DWORD_PTR)(__FILE__ ": port_handles_cs") }
-};
-static CRITICAL_SECTION port_handles_cs = { &port_handles_cs_debug, -1, 0, 0, 0, 0 };
-
-
-static CRITICAL_SECTION xcv_handles_cs;
-static CRITICAL_SECTION_DEBUG xcv_handles_cs_debug =
-{
-    0, 0, &xcv_handles_cs,
-    { &xcv_handles_cs_debug.ProcessLocksList, &xcv_handles_cs_debug.ProcessLocksList },
-      0, 0, { (DWORD_PTR)(__FILE__ ": xcv_handles_cs") }
-};
-static CRITICAL_SECTION xcv_handles_cs = { &xcv_handles_cs_debug, -1, 0, 0, 0, 0 };
-
-/* ############################### */
-
-typedef struct {
-    struct list entry;
-    DWORD   type;
-    WCHAR   nameW[1];
-} port_t;
-
-typedef struct {
-    struct list entry;
-    ACCESS_MASK GrantedAccess;
-    WCHAR       nameW[1];
-} xcv_t;
-
-static struct list port_handles = LIST_INIT( port_handles );
-static struct list xcv_handles = LIST_INIT( xcv_handles );
-
-/* ############################### */
-
-static const WCHAR cmd_AddPortW[] = {'A','d','d','P','o','r','t',0};
-static const WCHAR cmd_DeletePortW[] = {'D','e','l','e','t','e','P','o','r','t',0};
-static const WCHAR cmd_ConfigureLPTPortCommandOKW[] = {'C','o','n','f','i','g','u','r','e',
-                                    'L','P','T','P','o','r','t',
-                                    'C','o','m','m','a','n','d','O','K',0};
-
-static const WCHAR cmd_GetDefaultCommConfigW[] = {'G','e','t',
-                                    'D','e','f','a','u','l','t',
-                                    'C','o','m','m','C','o','n','f','i','g',0};
-
-static const WCHAR cmd_GetTransmissionRetryTimeoutW[] = {'G','e','t',
-                                    'T','r','a','n','s','m','i','s','s','i','o','n',
-                                    'R','e','t','r','y','T','i','m','e','o','u','t',0};
-
-static const WCHAR cmd_MonitorUIW[] = {'M','o','n','i','t','o','r','U','I',0};
-static const WCHAR cmd_PortIsValidW[] = {'P','o','r','t','I','s','V','a','l','i','d',0};
-static const WCHAR cmd_SetDefaultCommConfigW[] = {'S','e','t',
-                                    'D','e','f','a','u','l','t',
-                                    'C','o','m','m','C','o','n','f','i','g',0};
-
-static const WCHAR dllnameuiW[] = {'l','o','c','a','l','u','i','.','d','l','l',0};
-static const WCHAR emptyW[] = {0};
-static const WCHAR LocalPortW[] = {'L','o','c','a','l',' ','P','o','r','t',0};
-
-static const WCHAR portname_LPT[]  = {'L','P','T',0};
-static const WCHAR portname_COM[]  = {'C','O','M',0};
-static const WCHAR portname_FILE[] = {'F','I','L','E',':',0};
-static const WCHAR portname_CUPS[] = {'C','U','P','S',':',0};
-static const WCHAR portname_LPR[]  = {'L','P','R',':',0};
-
-static const WCHAR TransmissionRetryTimeoutW[] = {'T','r','a','n','s','m','i','s','s','i','o','n',
-                                    'R','e','t','r','y','T','i','m','e','o','u','t',0};
-
-static const WCHAR WinNT_CV_PortsW[] = {'S','o','f','t','w','a','r','e','\\',
-                                        'M','i','c','r','o','s','o','f','t','\\',
-                                        'W','i','n','d','o','w','s',' ','N','T','\\',
-                                        'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
-                                        'P','o','r','t','s',0};
-
-static const WCHAR WinNT_CV_WindowsW[] = {'S','o','f','t','w','a','r','e','\\',
-                                        'M','i','c','r','o','s','o','f','t','\\',
-                                        'W','i','n','d','o','w','s',' ','N','T','\\',
-                                        'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
-                                        'W','i','n','d','o','w','s',0};
-
-
-/******************************************************************
- * does_port_exist (internal)
- *
- * returns TRUE, when the Port already exists
- *
- */
-static BOOL does_port_exist(LPCWSTR myname)
-{
-
-    LPPORT_INFO_1W  pi;
-    DWORD   needed = 0;
-    DWORD   returned;
-    DWORD   id;
-
-    TRACE("(%s)\n", debugstr_w(myname));
-
-    id = EnumPortsW(NULL, 1, NULL, 0, &needed, &returned);
-    pi = heap_alloc(needed);
-    returned = 0;
-    if (pi)
-        id = EnumPortsW(NULL, 1, (LPBYTE) pi, needed, &needed, &returned);
-
-    if (id && returned > 0) {
-        /* we got a number of valid names. */
-        for (id = 0; id < returned; id++)
-        {
-            if (lstrcmpiW(myname, pi[id].pName) == 0) {
-                TRACE("(%u) found %s\n", id, debugstr_w(pi[id].pName));
-                heap_free(pi);
-                return TRUE;
-            }
-        }
-    }
-
-    heap_free(pi);
-    return FALSE;
-}
-
-/******************************************************************
- * enumerate the local Ports from the Registry (internal)  
- *
- * See localmon_EnumPortsW.
- *
- * NOTES
- *  returns the needed size (in bytes) for pPorts
- *  and *lpreturned is set to number of entries returned in pPorts
- *
- */
-
-static DWORD get_ports_from_reg(DWORD level, LPBYTE pPorts, DWORD cbBuf, LPDWORD lpreturned)
-{
-    HKEY    hroot = 0;
-    LPWSTR  ptr;
-    LPPORT_INFO_2W out;
-    WCHAR   portname[MAX_PATH];
-    WCHAR   res_PortW[IDS_LOCALPORT_MAXLEN];
-    WCHAR   res_MonitorW[IDS_LOCALMONITOR_MAXLEN];
-    INT     reslen_PortW;
-    INT     reslen_MonitorW;
-    DWORD   len;
-    DWORD   res;
-    DWORD   needed = 0;
-    DWORD   numentries;
-    DWORD   entrysize;
-    DWORD   id = 0;
-
-    TRACE("(%d, %p, %d, %p)\n", level, pPorts, cbBuf, lpreturned);
-
-    entrysize = (level == 1) ? sizeof(PORT_INFO_1W) : sizeof(PORT_INFO_2W);
-
-    numentries = *lpreturned;           /* this is 0, when we scan the registry */
-    needed = entrysize * numentries;
-    ptr = (LPWSTR) &pPorts[needed];
-
-    if (needed > cbBuf) pPorts = NULL;  /* No buffer for the structs */
-
-    numentries = 0;
-    needed = 0;
-
-    /* we do not check more parameters as done in windows */
-    if ((level < 1) || (level > 2)) {
-        goto getports_cleanup;
-    }
-
-    /* "+1" for '\0' */
-    reslen_MonitorW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALMONITOR, res_MonitorW, IDS_LOCALMONITOR_MAXLEN) + 1;  
-    reslen_PortW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALPORT, res_PortW, IDS_LOCALPORT_MAXLEN) + 1;  
-
-    res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_PortsW, &hroot);
-    if (res == ERROR_SUCCESS) {
-
-        /* Scan all Port-Names */
-        while (res == ERROR_SUCCESS) {
-            len = MAX_PATH;
-            portname[0] = '\0';
-            res = RegEnumValueW(hroot, id, portname, &len, NULL, NULL, NULL, NULL);
-
-            if ((res == ERROR_SUCCESS) && (portname[0])) {
-                numentries++;
-                /* calculate the required size */
-                needed += entrysize;
-                needed += (len + 1) * sizeof(WCHAR);
-                if (level > 1) {
-                    needed += (reslen_MonitorW + reslen_PortW) * sizeof(WCHAR);
-                }
-
-                /* Now fill the user-buffer, if available */
-                if (pPorts && (cbBuf >= needed)){
-                    out = (LPPORT_INFO_2W) pPorts;
-                    pPorts += entrysize;
-                    TRACE("%p: writing PORT_INFO_%dW #%d (%s)\n", out, level, numentries, debugstr_w(portname));
-                    out->pPortName = ptr;
-                    lstrcpyW(ptr, portname);            /* Name of the Port */
-                    ptr += (len + 1);
-                    if (level > 1) {
-                        out->pMonitorName = ptr;
-                        lstrcpyW(ptr, res_MonitorW);    /* Name of the Monitor */
-                        ptr += reslen_MonitorW;
-
-                        out->pDescription = ptr;
-                        lstrcpyW(ptr, res_PortW);       /* Port Description */
-                        ptr += reslen_PortW;
-
-                        out->fPortType = PORT_TYPE_WRITE;
-                        out->Reserved = 0;
-                    }
-                }
-                id++;
-            }
-        }
-        RegCloseKey(hroot);
-    }
-    else
-    {
-        ERR("failed with %d for %s\n", res, debugstr_w(WinNT_CV_PortsW));
-        SetLastError(res);
-    }
-
-getports_cleanup:
-    *lpreturned = numentries;
-    TRACE("need %d byte for %d entries (%d)\n", needed, numentries, GetLastError());
-    return needed;
-}
-
-/*****************************************************
- * get_type_from_name (internal)
- * 
- */
-
-static DWORD get_type_from_name(LPCWSTR name)
-{
-    HANDLE  hfile;
-
-    if (!strncmpW(name, portname_LPT, sizeof(portname_LPT) / sizeof(WCHAR) -1))
-        return PORT_IS_LPT;
-
-    if (!strncmpW(name, portname_COM, sizeof(portname_COM) / sizeof(WCHAR) -1))
-        return PORT_IS_COM;
-
-    if (!strcmpW(name, portname_FILE))
-        return PORT_IS_FILE;
-
-    if (name[0] == '/')
-        return PORT_IS_UNIXNAME;
-
-    if (name[0] == '|')
-        return PORT_IS_PIPE;
-
-    if (!strncmpW(name, portname_CUPS, sizeof(portname_CUPS) / sizeof(WCHAR) -1))
-        return PORT_IS_CUPS;
-
-    if (!strncmpW(name, portname_LPR, sizeof(portname_LPR) / sizeof(WCHAR) -1))
-        return PORT_IS_LPR;
-
-    /* Must be a file or a directory. Does the file exist ? */
-    hfile = CreateFileW(name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-    TRACE("%p for OPEN_EXISTING on %s\n", hfile, debugstr_w(name));
-    if (hfile == INVALID_HANDLE_VALUE) {
-        /* Can we create the file? */
-        hfile = CreateFileW(name, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL);
-        TRACE("%p for OPEN_ALWAYS\n", hfile);
-    }
-    if (hfile != INVALID_HANDLE_VALUE) {
-        CloseHandle(hfile);
-        return PORT_IS_FILENAME;
-    }
-    /* We can't use the name. use GetLastError() for the reason */
-    return PORT_IS_UNKNOWN;
-}
-
-/*****************************************************
- * get_type_from_local_name (internal)
- *
- */
-
-static DWORD get_type_from_local_name(LPCWSTR nameW)
-{
-    LPPORT_INFO_1W  pi;
-    LPWSTR  myname = NULL;
-    DWORD   needed = 0;
-    DWORD   numentries = 0;
-    DWORD   id = 0;
-
-    TRACE("(%s)\n", debugstr_w(myname));
-
-    needed = get_ports_from_reg(1, NULL, 0, &numentries);
-    pi = heap_alloc(needed);
-    if (pi)
-        needed = get_ports_from_reg(1, (LPBYTE) pi, needed, &numentries);
-
-    if (pi && needed && numentries > 0) {
-        /* we got a number of valid ports. */
-
-        while ((myname == NULL) && (id < numentries))
-        {
-            if (lstrcmpiW(nameW, pi[id].pName) == 0) {
-                TRACE("(%u) found %s\n", id, debugstr_w(pi[id].pName));
-                myname = pi[id].pName;
-            }
-            id++;
-        }
-    }
-
-    id = (myname) ? get_type_from_name(myname) : PORT_IS_UNKNOWN;
-
-    heap_free(pi);
-    return id;
-
-}
-/******************************************************************************
- *   localmon_AddPortExW [exported through MONITOREX]
- *
- * Add a Port, without presenting a user interface
- *
- * PARAMS
- *  pName         [I] Servername or NULL (local Computer)
- *  level         [I] Structure-Level (1) for pBuffer
- *  pBuffer       [I] PTR to the Input-Data (PORT_INFO_1)
- *  pMonitorName  [I] Name of the Monitor that manage the Port
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  Level 2 is documented on MSDN for Portmonitors, but not supported by the
- *  "Local Port" Portmonitor (localspl.dll / localmon.dll)
- */
-static BOOL WINAPI localmon_AddPortExW(LPWSTR pName, DWORD level, LPBYTE pBuffer, LPWSTR pMonitorName)
-{
-    PORT_INFO_1W * pi;
-    HKEY  hroot;
-    DWORD res;
-
-    pi = (PORT_INFO_1W *) pBuffer;
-    TRACE("(%s, %d, %p, %s) => %s\n", debugstr_w(pName), level, pBuffer,
-            debugstr_w(pMonitorName), debugstr_w(pi ? pi->pName : NULL));
-
-
-    if ((pMonitorName == NULL) || (lstrcmpiW(pMonitorName, LocalPortW) != 0 ) ||
-        (pi == NULL) || (pi->pName == NULL) || (pi->pName[0] == '\0') ) {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    if (level != 1) {
-        SetLastError(ERROR_INVALID_LEVEL);
-        return FALSE;
-    }
-
-    res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_PortsW, &hroot);
-    if (res == ERROR_SUCCESS) {
-        if (does_port_exist(pi->pName)) {
-            RegCloseKey(hroot);
-            TRACE("=> FALSE with %u\n", ERROR_INVALID_PARAMETER);
-            SetLastError(ERROR_INVALID_PARAMETER);
-            return FALSE;
-        }
-        res = RegSetValueExW(hroot, pi->pName, 0, REG_SZ, (const BYTE *) emptyW, sizeof(emptyW));
-        RegCloseKey(hroot);
-    }
-    if (res != ERROR_SUCCESS) SetLastError(ERROR_INVALID_PARAMETER);
-    TRACE("=> %u with %u\n", (res == ERROR_SUCCESS), GetLastError());
-    return (res == ERROR_SUCCESS);
-}
-
-/*****************************************************
- * localmon_ClosePort [exported through MONITOREX]
- *
- * Close a
- *
- * PARAMS
- *  hPort  [i] The Handle to close
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI localmon_ClosePort(HANDLE hPort)
-{
-    port_t * port = hPort;
-
-    TRACE("(%p)\n", port);
-    EnterCriticalSection(&port_handles_cs);
-    list_remove(&port->entry);
-    LeaveCriticalSection(&port_handles_cs);
-    heap_free(port);
-    return TRUE;
-}
-
-/*****************************************************
- *   localmon_EnumPortsW [exported through MONITOREX]
- *
- * Enumerate all local Ports
- *
- * PARAMS
- *  pName       [I] Servername (ignored)
- *  level       [I] Structure-Level (1 or 2)
- *  pPorts      [O] PTR to Buffer that receives the Result
- *  cbBuf       [I] Size of Buffer at pPorts
- *  pcbNeeded   [O] PTR to DWORD that receives the size in Bytes used / required for pPorts
- *  pcReturned  [O] PTR to DWORD that receives the number of Ports in pPorts
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pPorts, if cbBuf is too small
- *
- * NOTES
- *|  Windows ignores pName
- *|  Windows crash the app, when pPorts, pcbNeeded or pcReturned are NULL
- *|  Windows >NT4.0 does not check for illegal levels (TRUE is returned)
- *
- * ToDo
- *   "HCU\Software\Wine\Spooler\<portname>" - redirection
- *
- */
-static BOOL WINAPI localmon_EnumPortsW(LPWSTR pName, DWORD level, LPBYTE pPorts,
-                                       DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
-    BOOL    res = FALSE;
-    DWORD   needed;
-    DWORD   numentries;
-
-    TRACE("(%s, %d, %p, %d, %p, %p)\n",
-          debugstr_w(pName), level, pPorts, cbBuf, pcbNeeded, pcReturned);
-
-    numentries = 0;
-    needed = get_ports_from_reg(level, NULL, 0, &numentries);
-    /* we calculated the needed buffersize. now do the error-checks */
-    if (cbBuf < needed) {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        goto cleanup;
-    }
-
-    /* fill the buffer with the Port-Names */
-    needed = get_ports_from_reg(level, pPorts, cbBuf, &numentries);
-    res = TRUE;
-
-    if (pcReturned) *pcReturned = numentries;
-
-cleanup:
-    if (pcbNeeded)  *pcbNeeded = needed;
-
-    TRACE("returning %d with %d (%d byte for %d entries)\n", 
-            res, GetLastError(), needed, numentries);
-
-    return (res);
-}
-
-/*****************************************************
- * localmon_OpenPort [exported through MONITOREX]
- *
- * Open a Data-Channel for a Port
- *
- * PARAMS
- *  pName     [i] Name of selected Object
- *  phPort    [o] The resulting Handle is stored here
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI localmon_OpenPortW(LPWSTR pName, PHANDLE phPort)
-{
-    port_t * port;
-    DWORD   type;
-
-    TRACE("%s, %p)\n", debugstr_w(pName), phPort);
-
-    /* an empty name is invalid */
-    if (!pName[0]) return FALSE;
-
-    /* does the port exist? */
-    type = get_type_from_local_name(pName);
-    if (!type) return FALSE;
-
-    port = heap_alloc(FIELD_OFFSET(port_t, nameW[lstrlenW(pName) + 1]));
-    if (!port) return FALSE;
-
-    port->type = type;
-    lstrcpyW(port->nameW, pName);
-    *phPort = port;
-
-    EnterCriticalSection(&port_handles_cs);
-    list_add_tail(&port_handles, &port->entry);
-    LeaveCriticalSection(&port_handles_cs);
-
-    TRACE("=> %p\n", port);
-    return TRUE;
-}
-
-/*****************************************************
- * localmon_XcvClosePort [exported through MONITOREX]
- *
- * Close a Communication-Channel
- *
- * PARAMS
- *  hXcv  [i] The Handle to close
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI localmon_XcvClosePort(HANDLE hXcv)
-{
-    xcv_t * xcv = hXcv;
-
-    TRACE("(%p)\n", xcv);
-    /* No checks are done in Windows */
-    EnterCriticalSection(&xcv_handles_cs);
-    list_remove(&xcv->entry);
-    LeaveCriticalSection(&xcv_handles_cs);
-    heap_free(xcv);
-    return TRUE;
-}
-
-/*****************************************************
- * localmon_XcvDataPort [exported through MONITOREX]
- *
- * Execute command through a Communication-Channel
- *
- * PARAMS
- *  hXcv            [i] The Handle to work with
- *  pszDataName     [i] Name of the command to execute
- *  pInputData      [i] Buffer for extra Input Data (needed only for some commands)
- *  cbInputData     [i] Size in Bytes of Buffer at pInputData
- *  pOutputData     [o] Buffer to receive additional Data (needed only for some commands)
- *  cbOutputData    [i] Size in Bytes of Buffer at pOutputData
- *  pcbOutputNeeded [o] PTR to receive the minimal Size in Bytes of the Buffer at pOutputData
- *
- * RETURNS
- *  Success: ERROR_SUCCESS
- *  Failure: win32 error code
- *
- * NOTES
- *
- *  Minimal List of commands, that every Printmonitor DLL should support:
- *
- *| "MonitorUI" : Return the Name of the Userinterface-DLL as WSTR in pOutputData
- *| "AddPort"   : Add a Port (Name as WSTR in pInputData)
- *| "DeletePort": Delete a Port (Name as WSTR in pInputData)
- *
- *
- */
-static DWORD WINAPI localmon_XcvDataPort(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData,
-                                         PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded)
-{
-    WCHAR   buffer[16];     /* buffer for a decimal number */
-    LPWSTR  ptr;
-    DWORD   res;
-    DWORD   needed;
-    HKEY    hroot;
-
-    TRACE("(%p, %s, %p, %d, %p, %d, %p)\n", hXcv, debugstr_w(pszDataName),
-          pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded);
-
-    if (!lstrcmpW(pszDataName, cmd_AddPortW)) {
-        TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData));
-        res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_PortsW, &hroot);
-        if (res == ERROR_SUCCESS) {
-            if (does_port_exist((LPWSTR) pInputData)) {
-                RegCloseKey(hroot);
-                TRACE("=> %u\n", ERROR_ALREADY_EXISTS);
-                return ERROR_ALREADY_EXISTS;
-            }
-            res = RegSetValueExW(hroot, (LPWSTR) pInputData, 0, REG_SZ, (const BYTE *) emptyW, sizeof(emptyW));
-            RegCloseKey(hroot);
-        }
-        TRACE("=> %u\n", res);
-        return res;
-    }
-
-
-    if (!lstrcmpW(pszDataName, cmd_ConfigureLPTPortCommandOKW)) {
-        TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData));
-        res = RegCreateKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_WindowsW, &hroot);
-        if (res == ERROR_SUCCESS) {
-            res = RegSetValueExW(hroot, TransmissionRetryTimeoutW, 0, REG_SZ, pInputData, cbInputData);
-            RegCloseKey(hroot);
-        }
-        return res;
-    }
-
-    if (!lstrcmpW(pszDataName, cmd_DeletePortW)) {
-        TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData));
-        res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_PortsW, &hroot);
-        if (res == ERROR_SUCCESS) {
-            res = RegDeleteValueW(hroot, (LPWSTR) pInputData);
-            RegCloseKey(hroot);
-            TRACE("=> %u with %u\n", res, GetLastError() );
-            return res;
-        }
-        return ERROR_FILE_NOT_FOUND;
-    }
-
-    if (!lstrcmpW(pszDataName, cmd_GetDefaultCommConfigW)) {
-        TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData));
-        *pcbOutputNeeded = cbOutputData;
-        res = GetDefaultCommConfigW((LPWSTR) pInputData, (LPCOMMCONFIG) pOutputData, pcbOutputNeeded);
-        TRACE("got %u with %u\n", res, GetLastError() );
-        return res ? ERROR_SUCCESS : GetLastError();
-    }
-
-    if (!lstrcmpW(pszDataName, cmd_GetTransmissionRetryTimeoutW)) {
-        * pcbOutputNeeded = sizeof(DWORD);
-        if (cbOutputData >= sizeof(DWORD)) {
-            /* the w2k resource kit documented a default of 90, but that's wrong */
-            *((LPDWORD) pOutputData) = 45;
-
-            res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_WindowsW, &hroot);
-            if (res == ERROR_SUCCESS) {
-                needed = sizeof(buffer) - sizeof(WCHAR);
-                res = RegQueryValueExW(hroot, TransmissionRetryTimeoutW, NULL, NULL, (LPBYTE) buffer, &needed);
-                if ((res == ERROR_SUCCESS) && (buffer[0])) {
-                    *((LPDWORD) pOutputData) = strtoulW(buffer, NULL, 0);
-                }
-                RegCloseKey(hroot);
-            }
-            return ERROR_SUCCESS;
-        }
-        return ERROR_INSUFFICIENT_BUFFER;
-    }
-
-
-    if (!lstrcmpW(pszDataName, cmd_MonitorUIW)) {
-        * pcbOutputNeeded = sizeof(dllnameuiW);
-        if (cbOutputData >= sizeof(dllnameuiW)) {
-            memcpy(pOutputData, dllnameuiW, sizeof(dllnameuiW));
-            return ERROR_SUCCESS;
-        }
-        return ERROR_INSUFFICIENT_BUFFER;
-    }
-
-    if (!lstrcmpW(pszDataName, cmd_PortIsValidW)) {
-        TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData));
-        res = get_type_from_name((LPCWSTR) pInputData);
-        TRACE("detected as %u\n",  res);
-        /* names, that we have recognized, are valid */
-        if (res) return ERROR_SUCCESS;
-
-        /* ERROR_ACCESS_DENIED, ERROR_PATH_NOT_FOUND or something else */
-        TRACE("=> %u\n", GetLastError());
-        return GetLastError();
-    }
-
-    if (!lstrcmpW(pszDataName, cmd_SetDefaultCommConfigW)) {
-        /* get the portname from the Handle */
-        ptr =  strchrW(((xcv_t *)hXcv)->nameW, ' ');
-        if (ptr) {
-            ptr++;  /* skip the space */
-        }
-        else
-        {
-            ptr =  ((xcv_t *)hXcv)->nameW;
-        }
-        lstrcpynW(buffer, ptr, sizeof(buffer)/sizeof(WCHAR));
-        if (buffer[0]) buffer[lstrlenW(buffer)-1] = '\0';  /* remove the ':' */
-        res = SetDefaultCommConfigW(buffer, (LPCOMMCONFIG) pInputData, cbInputData);
-        TRACE("got %u with %u\n", res, GetLastError() );
-        return res ? ERROR_SUCCESS : GetLastError();
-    }
-
-    FIXME("command not supported: %s\n", debugstr_w(pszDataName));
-    return ERROR_INVALID_PARAMETER;
-}
-
-/*****************************************************
- * localmon_XcvOpenPort [exported through MONITOREX]
- *
- * Open a Communication-Channel
- *
- * PARAMS
- *  pName         [i] Name of selected Object
- *  GrantedAccess [i] Access-Rights to use
- *  phXcv         [o] The resulting Handle is stored here
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI localmon_XcvOpenPort(LPCWSTR pName, ACCESS_MASK GrantedAccess, PHANDLE phXcv)
-{
-    xcv_t * xcv;
-
-    TRACE("%s, 0x%x, %p)\n", debugstr_w(pName), GrantedAccess, phXcv);
-    /* No checks for any field is done in Windows */
-    xcv = heap_alloc(FIELD_OFFSET(xcv_t, nameW[lstrlenW(pName) + 1]));
-    if (xcv) {
-        xcv->GrantedAccess = GrantedAccess;
-        lstrcpyW(xcv->nameW, pName);
-        *phXcv = xcv;
-        EnterCriticalSection(&xcv_handles_cs);
-        list_add_tail(&xcv_handles, &xcv->entry);
-        LeaveCriticalSection(&xcv_handles_cs);
-        TRACE("=> %p\n", xcv);
-        return TRUE;
-    }
-    else
-    {
-        *phXcv = NULL;
-        return FALSE;
-    }
-}
-
-/*****************************************************
- *      InitializePrintMonitor  (LOCALSPL.@)
- *
- * Initialize the Monitor for the Local Ports
- *
- * PARAMS
- *  regroot [I] Registry-Path, where the settings are stored
- *
- * RETURNS
- *  Success: Pointer to a MONITOREX Structure
- *  Failure: NULL
- *
- * NOTES
- *  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)
-{
-    static MONITOREX mymonitorex =
-    {
-        sizeof(MONITOREX) - sizeof(DWORD),
-        {
-            localmon_EnumPortsW,
-            localmon_OpenPortW,
-            NULL,       /* localmon_OpenPortExW */ 
-            NULL,       /* localmon_StartDocPortW */
-            NULL,       /* localmon_WritePortW */
-            NULL,       /* localmon_ReadPortW */
-            NULL,       /* localmon_EndDocPortW */
-            localmon_ClosePort,
-            NULL,       /* Use AddPortUI in localui.dll */
-            localmon_AddPortExW,
-            NULL,       /* Use ConfigurePortUI in localui.dll */
-            NULL,       /* Use DeletePortUI in localui.dll */
-            NULL,       /* localmon_GetPrinterDataFromPort */
-            NULL,       /* localmon_SetPortTimeOuts */
-            localmon_XcvOpenPort,
-            localmon_XcvDataPort,
-            localmon_XcvClosePort
-        }
-    };
-
-    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;
-    }
-    TRACE("=> %p\n", &mymonitorex);
-    /* Native windows returns always the same pointer on success */
-    return &mymonitorex;
-}
diff --git a/reactos/dll/win32/localspl/localspl.rc b/reactos/dll/win32/localspl/localspl.rc
deleted file mode 100644 (file)
index cc6f4e0..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Top level resource file for localspl
- *
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
- */
-
-#include "resource.h"
-
-#define WINE_FILENAME_STR "localspl.dll"
-#define WINE_FILEDESCRIPTION_STR "Wine Printer spooler component"
-
-/* Same Version as WinXP_sp2 */
-#define WINE_FILEVERSION      5,1,2600,2180
-#define WINE_FILEVERSION_STR "5.1.2600.2180"
-
-#define WINE_PRODUCTVERSION      5,1,2600,2180
-#define WINE_PRODUCTVERSION_STR "5.1.2600.2180"
-
-#include <wine/wine_common_ver.rc>
-
-/* UTF-8 */
-#pragma code_page(65001)
-
-#ifdef LANGUAGE_DA_DK
-    #include "lang/spl_Da.rc"
-#endif
-#ifdef LANGUAGE_DE_DE
-    #include "lang/spl_De.rc"
-#endif
-#ifdef LANGUAGE_EN_US
-    #include "lang/spl_En.rc"
-#endif
-#ifdef LANGUAGE_ES_ES
-    #include "lang/spl_Es.rc"
-#endif
-#ifdef LANGUAGE_FR_FR
-    #include "lang/spl_Fr.rc"
-#endif
-#ifdef LANGUAGE_HE_IL
-    #include "lang/spl_He.rc"
-#endif
-#ifdef LANGUAGE_HU_HU
-    #include "lang/spl_Hu.rc"
-#endif
-#ifdef LANGUAGE_IT_IT
-    #include "lang/spl_It.rc"
-#endif
-#ifdef LANGUAGE_JA_JP
-    #include "lang/spl_Ja.rc"
-#endif
-#ifdef LANGUAGE_KO_KR
-    #include "lang/spl_Ko.rc"
-#endif
-#ifdef LANGUAGE_LT_LT
-    #include "lang/spl_Lt.rc"
-#endif
-#ifdef LANGUAGE_NL_NL
-    #include "lang/spl_Nl.rc"
-#endif
-#ifdef LANGUAGE_NO_NO
-    #include "lang/spl_No.rc"
-#endif
-#ifdef LANGUAGE_PL_PL
-    #include "lang/spl_Pl.rc"
-#endif
-#ifdef LANGUAGE_PT_PT
-    #include "lang/spl_Pt.rc"
-#endif
-#ifdef LANGUAGE_RO_RO
-    #include "lang/spl_Ro.rc"
-#endif
-#ifdef LANGUAGE_RU_RU
-    #include "lang/spl_Ru.rc"
-#endif
-#ifdef LANGUAGE_SL_SI
-    #include "lang/spl_Si.rc"
-#endif
-#ifdef LANGUAGE_SQ_AL
-    #include "lang/spl_Sq.rc"
-#endif
-#ifdef LANGUAGE_SV_SE
-    #include "lang/spl_Sv.rc"
-#endif
-#ifdef LANGUAGE_TR_TR
-    #include "lang/spl_Tr.rc"
-#endif
-#ifdef LANGUAGE_UK_UA
-    #include "lang/spl_Uk.rc"
-#endif
-#ifdef LANGUAGE_ZH_CN
-    #include "lang/spl_Zh.rc"
-#endif
diff --git a/reactos/dll/win32/localspl/localspl.spec b/reactos/dll/win32/localspl/localspl.spec
deleted file mode 100644 (file)
index 651d20d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-@ stub ClosePrintProcessor
-@ stub ControlPrintProcessor
-@ stub EnumPrintProcessorDatatypesW
-@ stub GetPrintProcessorCapabilities
-@ stdcall InitializePrintMonitor(wstr)
-# "Providor" is no typo here
-@ stdcall InitializePrintProvidor(ptr long wstr)
-@ stub OpenPrintProcessor
-@ stub PrintDocumentOnPrintProcessor
-@ stub PrintProcLogEvent
-@ stub SplAddForm
-@ stub SplAddMonitor
-@ stub SplAddPort
-@ stub SplAddPortEx
-@ stub SplAddPrinter
-@ stub SplAddPrinterDriverEx
-@ stub SplAddPrintProcessor
-@ stub SplBroadcastChange
-@ stub SplClosePrinter
-@ stub SplCloseSpooler
-@ stub SplConfigChange
-@ stub SplCopyFileEvent
-@ stub SplCopyNumberOfFiles
-@ stub SplCreateSpooler
-@ stub SplDeleteForm
-@ stub SplDeleteMonitor
-@ stub SplDeletePort
-@ stub SplDeletePrinter
-@ stub SplDeletePrinterDriverEx
-@ stub SplDeletePrinterKey
-@ stub SplDeletePrintProcessor
-@ stub SplDeleteSpooler
-@ stub SplDriverEvent
-@ stub SplEnumForms
-@ stub SplEnumMonitors
-@ stub SplEnumPorts
-@ stub SplEnumPrinterDataEx
-@ stub SplEnumPrinterKey
-@ stub SplEnumPrinters
-@ stub SplEnumPrintProcessorDatatypes
-@ stub SplEnumPrintProcessors
-@ stub SplGetDriverDir
-@ stub SplGetForm
-@ stub SplGetPrinter
-@ stub SplGetPrinterData
-@ stub SplGetPrinterDataEx
-@ stub SplGetPrinterDriver
-@ stub SplGetPrinterDriverDirectory
-@ stub SplGetPrinterDriverEx
-@ stub SplGetPrinterExtra
-@ stub SplGetPrinterExtraEx
-@ stub SplGetPrintProcessorDirectory
-@ stub SplLoadLibraryTheCopyFileModule
-@ stub SplMonitorIsInstalled
-@ stub SplOpenPrinter
-@ stub SplReenumeratePorts
-@ stub SplResetPrinter
-@ stub SplSetForm
-@ stub SplSetPrinter
-@ stub SplSetPrinterData
-@ stub SplSetPrinterDataEx
-@ stub SplSetPrinterExtra
-@ stub SplSetPrinterExtraEx
-@ stub SplXcvData
diff --git a/reactos/dll/win32/localspl/localspl_main.c b/reactos/dll/win32/localspl/localspl_main.c
deleted file mode 100644 (file)
index 6e594c7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Implementation of the Local Printprovider/ Printmonitor/ Prontprocessor
- *
- * Copyright 2006-2009 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "localspl_private.h"
-
-HINSTANCE LOCALSPL_hInstance = NULL;
-
-/*****************************************************
- *      DllMain
- */
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
-    TRACE("(%p, %d, %p)\n",hinstDLL, fdwReason, lpvReserved);
-
-    switch(fdwReason)
-    {
-        case DLL_WINE_PREATTACH:
-            return FALSE;           /* prefer native version */
-
-        case DLL_PROCESS_ATTACH:
-            DisableThreadLibraryCalls( hinstDLL );
-            LOCALSPL_hInstance = hinstDLL;
-            setup_provider();
-            break;
-    }
-    return TRUE;
-}
diff --git a/reactos/dll/win32/localspl/localspl_private.h b/reactos/dll/win32/localspl/localspl_private.h
deleted file mode 100644 (file)
index 359b30b..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Implementation of the Local Printmonitor: internal include file
- *
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef __WINE_LOCALSPL_PRIVATE__
-#define __WINE_LOCALSPL_PRIVATE__
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winreg.h>
-#include <winspool.h>
-
-#include <wine/list.h>
-#include <wine/unicode.h>
-#include <ddk/winsplp.h>
-
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(localspl);
-
-/* ## DLL-wide Globals ## */
-extern HINSTANCE LOCALSPL_hInstance DECLSPEC_HIDDEN;
-void setup_provider(void) DECLSPEC_HIDDEN;
-
-/* ## Type of Ports ## */
-/* windows types */
-#define PORT_IS_UNKNOWN  0
-#define PORT_IS_LPT      1
-#define PORT_IS_COM      2
-#define PORT_IS_FILE     3
-#define PORT_IS_FILENAME 4
-
-/* wine extensions */
-#define PORT_IS_WINE     5
-#define PORT_IS_UNIXNAME 5
-#define PORT_IS_PIPE     6
-#define PORT_IS_CUPS     7
-#define PORT_IS_LPR      8
-
-
-/* ## Memory allocation functions ## */
-
-static inline void * __WINE_ALLOC_SIZE(1) heap_alloc( size_t len )
-{
-    return HeapAlloc( GetProcessHeap(), 0, len );
-}
-
-static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero( size_t len )
-{
-    return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len );
-}
-
-static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero( void * mem, size_t len )
-{
-    return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len );
-}
-
-static inline BOOL heap_free( void *mem )
-{
-    return HeapFree( GetProcessHeap(), 0, mem );
-}
-
-#endif /* __WINE_LOCALSPL_PRIVATE__ */
diff --git a/reactos/dll/win32/localspl/provider.c b/reactos/dll/win32/localspl/provider.c
deleted file mode 100644 (file)
index d07a04c..0000000
+++ /dev/null
@@ -1,2456 +0,0 @@
-/*
- * Implementation of the Local Printprovider
- *
- * Copyright 2006-2009 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "localspl_private.h"
-
-#include <shlwapi.h>
-#include <ddk/winddiui.h>
-
-/* ############################### */
-
-static CRITICAL_SECTION monitor_handles_cs;
-static CRITICAL_SECTION_DEBUG monitor_handles_cs_debug =
-{
-    0, 0, &monitor_handles_cs,
-    { &monitor_handles_cs_debug.ProcessLocksList, &monitor_handles_cs_debug.ProcessLocksList },
-      0, 0, { (DWORD_PTR)(__FILE__ ": monitor_handles_cs") }
-};
-static CRITICAL_SECTION monitor_handles_cs = { &monitor_handles_cs_debug, -1, 0, 0, 0, 0 };
-
-/* ############################### */
-
-typedef struct {
-    WCHAR   src[MAX_PATH+MAX_PATH];
-    WCHAR   dst[MAX_PATH+MAX_PATH];
-    DWORD   srclen;
-    DWORD   dstlen;
-    DWORD   copyflags;
-    BOOL    lazy;
-} apd_data_t;
-
-typedef struct {
-    struct list     entry;
-    LPWSTR          name;
-    LPWSTR          dllname;
-    PMONITORUI      monitorUI;
-    LPMONITOR       monitor;
-    HMODULE         hdll;
-    DWORD           refcount;
-    DWORD           dwMonitorSize;
-} monitor_t;
-
-typedef struct {
-    LPCWSTR  envname;
-    LPCWSTR  subdir;
-    DWORD    driverversion;
-    LPCWSTR  versionregpath;
-    LPCWSTR  versionsubdir;
-} printenv_t;
-
-typedef struct {
-    LPWSTR name;
-    LPWSTR printername;
-    monitor_t * pm;
-    HANDLE hXcv;
-} printer_t;
-
-/* ############################### */
-
-static struct list monitor_handles = LIST_INIT( monitor_handles );
-static monitor_t * pm_localport;
-
-static const PRINTPROVIDOR * pprovider = NULL;
-
-static const WCHAR backslashW[] = {'\\',0};
-static const WCHAR bs_ports_bsW[] = {'\\','P','o','r','t','s','\\',0};
-static const WCHAR configuration_fileW[] = {'C','o','n','f','i','g','u','r','a','t','i','o','n',' ','F','i','l','e',0};
-static const WCHAR datatypeW[] = {'D','a','t','a','t','y','p','e',0};
-static const WCHAR data_fileW[] = {'D','a','t','a',' ','F','i','l','e',0};
-static const WCHAR dependent_filesW[] = {'D','e','p','e','n','d','e','n','t',' ','F','i','l','e','s',0};
-static const WCHAR driverW[] = {'D','r','i','v','e','r',0};
-static const WCHAR emptyW[] = {0};
-static const WCHAR fmt_driversW[] = { 'S','y','s','t','e','m','\\',
-                                  'C','u', 'r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
-                                  'c','o','n','t','r','o','l','\\',
-                                  'P','r','i','n','t','\\',
-                                  'E','n','v','i','r','o','n','m','e','n','t','s','\\',
-                                  '%','s','\\','D','r','i','v','e','r','s','%','s',0 };
-static const WCHAR fmt_printprocessorsW[] = { 'S','y','s','t','e','m','\\',
-                                  'C','u', 'r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
-                                  'C','o','n','t','r','o','l','\\',
-                                  'P','r','i','n','t','\\',
-                                  'E','n','v','i','r','o','n','m','e','n','t','s','\\','%','s','\\',
-                                  'P','r','i','n','t',' ','P','r','o','c','e','s','s','o','r','s',0 };
-static const WCHAR help_fileW[] = {'H','e','l','p',' ','F','i','l','e',0};
-static const WCHAR ia64_envnameW[] = {'W','i','n','d','o','w','s',' ','I','A','6','4',0};
-static const WCHAR ia64_subdirW[] = {'i','a','6','4',0};
-static const WCHAR localportW[] = {'L','o','c','a','l',' ','P','o','r','t',0};
-static const WCHAR monitorW[] = {'M','o','n','i','t','o','r',0};
-static const WCHAR monitorsW[] = {'S','y','s','t','e','m','\\',
-                                'C','u', 'r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
-                                'C','o','n','t','r','o','l','\\',
-                                'P','r','i','n','t','\\',
-                                'M','o','n','i','t','o','r','s','\\',0};
-static const WCHAR monitorUIW[] = {'M','o','n','i','t','o','r','U','I',0};
-static const WCHAR previous_namesW[] = {'P','r','e','v','i','o','u','s',' ','N','a','m','e','s',0};
-static const WCHAR printersW[] = {'S','y','s','t','e','m','\\',
-                                  'C','u', 'r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
-                                  'C','o','n','t','r','o','l','\\',
-                                  'P','r','i','n','t','\\',
-                                  'P','r','i','n','t','e','r','s',0};
-static const WCHAR spoolW[] = {'\\','s','p','o','o','l',0};
-static const WCHAR driversW[] = {'\\','d','r','i','v','e','r','s','\\',0};
-static const WCHAR spoolprtprocsW[] = {'\\','s','p','o','o','l','\\','p','r','t','p','r','o','c','s','\\',0};
-static const WCHAR version0_regpathW[] = {'\\','V','e','r','s','i','o','n','-','0',0};
-static const WCHAR version0_subdirW[] = {'\\','0',0};
-static const WCHAR version3_regpathW[] = {'\\','V','e','r','s','i','o','n','-','3',0};
-static const WCHAR version3_subdirW[] = {'\\','3',0};
-static const WCHAR versionW[] = {'V','e','r','s','i','o','n',0};
-static const WCHAR win40_envnameW[] = {'W','i','n','d','o','w','s',' ','4','.','0',0};
-static const WCHAR win40_subdirW[] = {'w','i','n','4','0',0};
-static const WCHAR winnt_cv_portsW[] = {'S','o','f','t','w','a','r','e','\\',
-                                        'M','i','c','r','o','s','o','f','t','\\',
-                                        'W','i','n','d','o','w','s',' ','N','T','\\',
-                                        'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
-                                        'P','o','r','t','s',0};
-static const WCHAR winprintW[] = {'w','i','n','p','r','i','n','t',0};
-static const WCHAR x64_envnameW[] = {'W','i','n','d','o','w','s',' ','x','6','4',0};
-static const WCHAR x64_subdirW[] = {'x','6','4',0};
-static const WCHAR x86_envnameW[] = {'W','i','n','d','o','w','s',' ','N','T',' ','x','8','6',0};
-static const WCHAR x86_subdirW[] = {'w','3','2','x','8','6',0};
-static const WCHAR XcvMonitorW[] = {',','X','c','v','M','o','n','i','t','o','r',' ',0};
-static const WCHAR XcvPortW[] = {',','X','c','v','P','o','r','t',' ',0};
-
-
-static const printenv_t env_ia64 =  {ia64_envnameW, ia64_subdirW, 3,
-                                     version3_regpathW, version3_subdirW};
-
-static const printenv_t env_x86 =   {x86_envnameW, x86_subdirW, 3,
-                                     version3_regpathW, version3_subdirW};
-
-static const printenv_t env_x64 =   {x64_envnameW, x64_subdirW, 3,
-                                     version3_regpathW, version3_subdirW};
-
-static const printenv_t env_win40 = {win40_envnameW, win40_subdirW, 0,
-                                     version0_regpathW, version0_subdirW};
-
-static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_ia64, &env_win40};
-
-
-static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_2W),
-                                     sizeof(DRIVER_INFO_3W), sizeof(DRIVER_INFO_4W),
-                                     sizeof(DRIVER_INFO_5W), sizeof(DRIVER_INFO_6W),
-                                  0, sizeof(DRIVER_INFO_8W)};
-
-
-/******************************************************************
- * strdupW [internal]
- *
- * create a copy of a unicode-string
- *
- */
-static LPWSTR strdupW(LPCWSTR p)
-{
-    LPWSTR ret;
-    DWORD len;
-
-    if(!p) return NULL;
-    len = (lstrlenW(p) + 1) * sizeof(WCHAR);
-    ret = heap_alloc(len);
-    if (ret) memcpy(ret, p, len);
-    return ret;
-}
-
-/******************************************************************
- *  apd_copyfile [internal]
- *
- * Copy a file from the driverdirectory to the versioned directory
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL apd_copyfile( WCHAR *pathname, WCHAR *file_part, apd_data_t *apd )
-{
-    WCHAR *srcname;
-    BOOL res;
-
-    apd->src[apd->srclen] = '\0';
-    apd->dst[apd->dstlen] = '\0';
-
-    if (!pathname || !pathname[0]) {
-        /* nothing to copy */
-        return TRUE;
-    }
-
-    if (apd->copyflags & APD_COPY_FROM_DIRECTORY)
-        srcname = pathname;
-    else
-    {
-        srcname = apd->src;
-        strcatW( srcname, file_part );
-    }
-    strcatW( apd->dst, file_part );
-
-    TRACE("%s => %s\n", debugstr_w(srcname), debugstr_w(apd->dst));
-
-    /* FIXME: handle APD_COPY_NEW_FILES */
-    res = CopyFileW(srcname, apd->dst, FALSE);
-    TRACE("got %d with %u\n", res, GetLastError());
-
-    return apd->lazy || res;
-}
-
-/******************************************************************
- * copy_servername_from_name  (internal)
- *
- * for an external server, the serverpart from the name is copied.
- *
- * RETURNS
- *  the length (in WCHAR) of the serverpart (0 for the local computer)
- *  (-length), when the name is too long
- *
- */
-static LONG copy_servername_from_name(LPCWSTR name, LPWSTR target)
-{
-    LPCWSTR server;
-    LPWSTR  ptr;
-    WCHAR   buffer[MAX_COMPUTERNAME_LENGTH +1];
-    DWORD   len;
-    DWORD   serverlen;
-
-    if (target) *target = '\0';
-
-    if (name == NULL) return 0;
-    if ((name[0] != '\\') || (name[1] != '\\')) return 0;
-
-    server = &name[2];
-    /* skip over both backslash, find separator '\' */
-    ptr = strchrW(server, '\\');
-    serverlen = (ptr) ? ptr - server : lstrlenW(server);
-
-    /* servername is empty */
-    if (serverlen == 0) return 0;
-
-    TRACE("found %s\n", debugstr_wn(server, serverlen));
-
-    if (serverlen > MAX_COMPUTERNAME_LENGTH) return -serverlen;
-
-    if (target) {
-        memcpy(target, server, serverlen * sizeof(WCHAR));
-        target[serverlen] = '\0';
-    }
-
-    len = sizeof(buffer) / sizeof(buffer[0]);
-    if (GetComputerNameW(buffer, &len)) {
-        if ((serverlen == len) && (strncmpiW(server, buffer, len) == 0)) {
-            /* The requested Servername is our computername */
-            return 0;
-        }
-    }
-    return serverlen;
-}
-
-/******************************************************************
- * get_basename_from_name  (internal)
- *
- * skip over the serverpart from the full name
- *
- */
-static LPCWSTR get_basename_from_name(LPCWSTR name)
-{
-    if (name == NULL)  return NULL;
-    if ((name[0] == '\\') && (name[1] == '\\')) {
-        /* skip over the servername and search for the following '\'  */
-        name = strchrW(&name[2], '\\');
-        if ((name) && (name[1])) {
-            /* found a separator ('\') followed by a name:
-               skip over the separator and return the rest */
-            name++;
-        }
-        else
-        {
-            /* no basename present (we found only a servername) */
-            return NULL;
-        }
-    }
-    return name;
-}
-
-/******************************************************************
- * monitor_unload [internal]
- *
- * release a printmonitor and unload it from memory, when needed
- *
- */
-static void monitor_unload(monitor_t * pm)
-{
-    if (pm == NULL) return;
-    TRACE("%p (refcount: %d) %s\n", pm, pm->refcount, debugstr_w(pm->name));
-
-    EnterCriticalSection(&monitor_handles_cs);
-
-    if (pm->refcount) pm->refcount--;
-
-    if (pm->refcount == 0) {
-        list_remove(&pm->entry);
-        FreeLibrary(pm->hdll);
-        heap_free(pm->name);
-        heap_free(pm->dllname);
-        heap_free(pm);
-    }
-    LeaveCriticalSection(&monitor_handles_cs);
-}
-
-/******************************************************************
- * monitor_unloadall [internal]
- *
- * release all registered printmonitors and unload them from memory, when needed
- *
- */
-
-static void monitor_unloadall(void)
-{
-    monitor_t * pm;
-    monitor_t * next;
-
-    EnterCriticalSection(&monitor_handles_cs);
-    /* iterate through the list, with safety against removal */
-    LIST_FOR_EACH_ENTRY_SAFE(pm, next, &monitor_handles, monitor_t, entry)
-    {
-        /* skip monitorui dlls */
-        if (pm->monitor) monitor_unload(pm);
-    }
-    LeaveCriticalSection(&monitor_handles_cs);
-}
-
-/******************************************************************
- * monitor_load [internal]
- *
- * load a printmonitor, get the dllname from the registry, when needed
- * initialize the monitor and dump found function-pointers
- *
- * On failure, SetLastError() is called and NULL is returned
- */
-
-static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
-{
-    LPMONITOR2  (WINAPI *pInitializePrintMonitor2) (PMONITORINIT, LPHANDLE);
-    PMONITORUI  (WINAPI *pInitializePrintMonitorUI)(VOID);
-    LPMONITOREX (WINAPI *pInitializePrintMonitor)  (LPWSTR);
-    DWORD (WINAPI *pInitializeMonitorEx)(LPWSTR, LPMONITOR);
-    DWORD (WINAPI *pInitializeMonitor)  (LPWSTR);
-
-    monitor_t * pm = NULL;
-    monitor_t * cursor;
-    LPWSTR  regroot = NULL;
-    LPWSTR  driver = dllname;
-
-    TRACE("(%s, %s)\n", debugstr_w(name), debugstr_w(dllname));
-    /* Is the Monitor already loaded? */
-    EnterCriticalSection(&monitor_handles_cs);
-
-    if (name) {
-        LIST_FOR_EACH_ENTRY(cursor, &monitor_handles, monitor_t, entry)
-        {
-            if (cursor->name && (lstrcmpW(name, cursor->name) == 0)) {
-                pm = cursor;
-                break;
-            }
-        }
-    }
-
-    if (pm == NULL) {
-        pm = heap_alloc_zero(sizeof(monitor_t));
-        if (pm == NULL) goto cleanup;
-        list_add_tail(&monitor_handles, &pm->entry);
-    }
-    pm->refcount++;
-
-    if (pm->name == NULL) {
-        /* Load the monitor */
-        LPMONITOREX pmonitorEx;
-        DWORD   len;
-
-        if (name) {
-            len = lstrlenW(monitorsW) + lstrlenW(name) + 2;
-            regroot = heap_alloc(len * sizeof(WCHAR));
-        }
-
-        if (regroot) {
-            lstrcpyW(regroot, monitorsW);
-            lstrcatW(regroot, name);
-            /* Get the Driver from the Registry */
-            if (driver == NULL) {
-                HKEY    hroot;
-                DWORD   namesize;
-                if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) {
-                    if (RegQueryValueExW(hroot, driverW, NULL, NULL, NULL,
-                                        &namesize) == ERROR_SUCCESS) {
-                        driver = heap_alloc(namesize);
-                        RegQueryValueExW(hroot, driverW, NULL, NULL, (LPBYTE) driver, &namesize) ;
-                    }
-                    RegCloseKey(hroot);
-                }
-            }
-        }
-
-        pm->name = strdupW(name);
-        pm->dllname = strdupW(driver);
-
-        if ((name && (!regroot || !pm->name)) || !pm->dllname) {
-            monitor_unload(pm);
-            SetLastError(ERROR_NOT_ENOUGH_MEMORY);
-            pm = NULL;
-            goto cleanup;
-        }
-
-        pm->hdll = LoadLibraryW(driver);
-        TRACE("%p: LoadLibrary(%s) => %d\n", pm->hdll, debugstr_w(driver), GetLastError());
-
-        if (pm->hdll == NULL) {
-            monitor_unload(pm);
-            SetLastError(ERROR_MOD_NOT_FOUND);
-            pm = NULL;
-            goto cleanup;
-        }
-
-        pInitializePrintMonitor2  = (void *)GetProcAddress(pm->hdll, "InitializePrintMonitor2");
-        pInitializePrintMonitorUI = (void *)GetProcAddress(pm->hdll, "InitializePrintMonitorUI");
-        pInitializePrintMonitor   = (void *)GetProcAddress(pm->hdll, "InitializePrintMonitor");
-        pInitializeMonitorEx = (void *)GetProcAddress(pm->hdll, "InitializeMonitorEx");
-        pInitializeMonitor   = (void *)GetProcAddress(pm->hdll, "InitializeMonitor");
-
-
-        TRACE("%p: %s,pInitializePrintMonitor2\n", pInitializePrintMonitor2, debugstr_w(driver));
-        TRACE("%p: %s,pInitializePrintMonitorUI\n", pInitializePrintMonitorUI, debugstr_w(driver));
-        TRACE("%p: %s,pInitializePrintMonitor\n", pInitializePrintMonitor, debugstr_w(driver));
-        TRACE("%p: %s,pInitializeMonitorEx\n", pInitializeMonitorEx, debugstr_w(driver));
-        TRACE("%p: %s,pInitializeMonitor\n", pInitializeMonitor, debugstr_w(driver));
-
-        if (pInitializePrintMonitorUI  != NULL) {
-            pm->monitorUI = pInitializePrintMonitorUI();
-            TRACE("%p: MONITORUI from %s,InitializePrintMonitorUI()\n", pm->monitorUI, debugstr_w(driver));
-            if (pm->monitorUI) {
-                TRACE("0x%08x: dwMonitorSize (%d)\n",
-                        pm->monitorUI->dwMonitorUISize, pm->monitorUI->dwMonitorUISize);
-
-            }
-        }
-
-        if (pInitializePrintMonitor && regroot) {
-            pmonitorEx = pInitializePrintMonitor(regroot);
-            TRACE("%p: LPMONITOREX from %s,InitializePrintMonitor(%s)\n",
-                    pmonitorEx, debugstr_w(driver), debugstr_w(regroot));
-
-            if (pmonitorEx) {
-                pm->dwMonitorSize = pmonitorEx->dwMonitorSize;
-                pm->monitor = &(pmonitorEx->Monitor);
-            }
-        }
-
-        if (pm->monitor) {
-            TRACE("0x%08x: dwMonitorSize (%d)\n", pm->dwMonitorSize, pm->dwMonitorSize);
-
-        }
-
-        if (!pm->monitor && regroot) {
-            if (pInitializePrintMonitor2 != NULL) {
-                FIXME("%s,InitializePrintMonitor2 not implemented\n", debugstr_w(driver));
-            }
-            if (pInitializeMonitorEx != NULL) {
-                FIXME("%s,InitializeMonitorEx not implemented\n", debugstr_w(driver));
-            }
-            if (pInitializeMonitor != NULL) {
-                FIXME("%s,InitializeMonitor not implemented\n", debugstr_w(driver));
-            }
-        }
-        if (!pm->monitor && !pm->monitorUI) {
-            monitor_unload(pm);
-            SetLastError(ERROR_PROC_NOT_FOUND);
-            pm = NULL;
-        }
-    }
-cleanup:
-    if ((pm_localport ==  NULL) && (pm != NULL) && (lstrcmpW(pm->name, localportW) == 0)) {
-        pm->refcount++;
-        pm_localport = pm;
-    }
-    LeaveCriticalSection(&monitor_handles_cs);
-    if (driver != dllname) heap_free(driver);
-    heap_free(regroot);
-    TRACE("=> %p\n", pm);
-    return pm;
-}
-
-/******************************************************************
- * monitor_loadall [internal]
- *
- * Load all registered monitors
- *
- */
-static DWORD monitor_loadall(void)
-{
-    monitor_t * pm;
-    DWORD   registered = 0;
-    DWORD   loaded = 0;
-    HKEY    hmonitors;
-    WCHAR   buffer[MAX_PATH];
-    DWORD   id = 0;
-
-    if (RegOpenKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hmonitors) == ERROR_SUCCESS) {
-        RegQueryInfoKeyW(hmonitors, NULL, NULL, NULL, &registered, NULL, NULL,
-                        NULL, NULL, NULL, NULL, NULL);
-
-        TRACE("%d monitors registered\n", registered);
-
-        while (id < registered) {
-            buffer[0] = '\0';
-            RegEnumKeyW(hmonitors, id, buffer, MAX_PATH);
-            pm = monitor_load(buffer, NULL);
-            if (pm) loaded++;
-            id++;
-        }
-        RegCloseKey(hmonitors);
-    }
-    TRACE("%d monitors loaded\n", loaded);
-    return loaded;
-}
-
-/******************************************************************
- * monitor_loadui [internal]
- *
- * load the userinterface-dll for a given portmonitor
- *
- * On failure, NULL is returned
- */
-static monitor_t * monitor_loadui(monitor_t * pm)
-{
-    monitor_t * pui = NULL;
-    WCHAR   buffer[MAX_PATH];
-    HANDLE  hXcv;
-    DWORD   len;
-    DWORD   res;
-
-    if (pm == NULL) return NULL;
-    TRACE("(%p) => dllname: %s\n", pm, debugstr_w(pm->dllname));
-
-    /* Try the Portmonitor first; works for many monitors */
-    if (pm->monitorUI) {
-        EnterCriticalSection(&monitor_handles_cs);
-        pm->refcount++;
-        LeaveCriticalSection(&monitor_handles_cs);
-        return pm;
-    }
-
-    /* query the userinterface-dllname from the Portmonitor */
-    if ((pm->monitor) && (pm->monitor->pfnXcvDataPort)) {
-        /* building (",XcvMonitor %s",pm->name) not needed yet */
-        res = pm->monitor->pfnXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv);
-        TRACE("got %u with %p\n", res, hXcv);
-        if (res) {
-            res = pm->monitor->pfnXcvDataPort(hXcv, monitorUIW, NULL, 0, (BYTE *) buffer, sizeof(buffer), &len);
-            TRACE("got %u with %s\n", res, debugstr_w(buffer));
-            if (res == ERROR_SUCCESS) pui = monitor_load(NULL, buffer);
-            pm->monitor->pfnXcvClosePort(hXcv);
-        }
-    }
-    return pui;
-}
-
-/******************************************************************
- * monitor_load_by_port [internal]
- *
- * load a printmonitor for a given port
- *
- * On failure, NULL is returned
- */
-
-static monitor_t * monitor_load_by_port(LPCWSTR portname)
-{
-    HKEY    hroot;
-    HKEY    hport;
-    LPWSTR  buffer;
-    monitor_t * pm = NULL;
-    DWORD   registered = 0;
-    DWORD   id = 0;
-    DWORD   len;
-
-    TRACE("(%s)\n", debugstr_w(portname));
-
-    /* Try the Local Monitor first */
-    if (RegOpenKeyW(HKEY_LOCAL_MACHINE, winnt_cv_portsW, &hroot) == ERROR_SUCCESS) {
-        if (RegQueryValueExW(hroot, portname, NULL, NULL, NULL, &len) == ERROR_SUCCESS) {
-            /* found the portname */
-            RegCloseKey(hroot);
-            return monitor_load(localportW, NULL);
-        }
-        RegCloseKey(hroot);
-    }
-
-    len = MAX_PATH + lstrlenW(bs_ports_bsW) + lstrlenW(portname) + 1;
-    buffer = heap_alloc(len * sizeof(WCHAR));
-    if (buffer == NULL) return NULL;
-
-    if (RegOpenKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) == ERROR_SUCCESS) {
-        EnterCriticalSection(&monitor_handles_cs);
-        RegQueryInfoKeyW(hroot, NULL, NULL, NULL, &registered, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
-        while ((pm == NULL) && (id < registered)) {
-            buffer[0] = '\0';
-            RegEnumKeyW(hroot, id, buffer, MAX_PATH);
-            TRACE("testing %s\n", debugstr_w(buffer));
-            len = lstrlenW(buffer);
-            lstrcatW(buffer, bs_ports_bsW);
-            lstrcatW(buffer, portname);
-            if (RegOpenKeyW(hroot, buffer, &hport) == ERROR_SUCCESS) {
-                RegCloseKey(hport);
-                buffer[len] = '\0';             /* use only the Monitor-Name */
-                pm = monitor_load(buffer, NULL);
-            }
-            id++;
-        }
-        LeaveCriticalSection(&monitor_handles_cs);
-        RegCloseKey(hroot);
-    }
-    heap_free(buffer);
-    return pm;
-}
-
-/******************************************************************
- * Return the number of bytes for an multi_sz string.
- * The result includes all \0s
- * (specifically the extra \0, that is needed as multi_sz terminator).
- */
-static int multi_sz_lenW(const WCHAR *str)
-{
-    const WCHAR *ptr = str;
-    if (!str) return 0;
-    do
-    {
-        ptr += lstrlenW(ptr) + 1;
-    } while (*ptr);
-
-    return (ptr - str + 1) * sizeof(WCHAR);
-}
-
-/******************************************************************
- * validate_envW [internal]
- *
- * validate the user-supplied printing-environment
- *
- * PARAMS
- *  env  [I] PTR to Environment-String or NULL
- *
- * RETURNS
- *  Success:  PTR to printenv_t
- *  Failure:  NULL and ERROR_INVALID_ENVIRONMENT
- *
- * NOTES
- *  An empty string is handled the same way as NULL.
- *
- */
-
-static const  printenv_t * validate_envW(LPCWSTR env)
-{
-    const printenv_t *result = NULL;
-    unsigned int i;
-
-    TRACE("(%s)\n", debugstr_w(env));
-    if (env && env[0])
-    {
-        for (i = 0; i < sizeof(all_printenv)/sizeof(all_printenv[0]); i++)
-        {
-            if (lstrcmpiW(env, all_printenv[i]->envname) == 0)
-            {
-                result = all_printenv[i];
-                break;
-            }
-        }
-        if (result == NULL) {
-            FIXME("unsupported Environment: %s\n", debugstr_w(env));
-            SetLastError(ERROR_INVALID_ENVIRONMENT);
-        }
-        /* on win9x, only "Windows 4.0" is allowed, but we ignore this */
-    }
-    else
-    {
-        result = (GetVersion() & 0x80000000) ? &env_win40 : &env_x86;
-    }
-
-    TRACE("=> using %p: %s\n", result, debugstr_w(result ? result->envname : NULL));
-    return result;
-}
-
-/*****************************************************************************
- * enumerate the local monitors (INTERNAL)
- *
- * returns the needed size (in bytes) for pMonitors
- * and  *lpreturned is set to number of entries returned in pMonitors
- *
- * Language-Monitors are also installed in the same Registry-Location but
- * they are filtered in Windows (not returned by EnumMonitors).
- * We do no filtering to simplify our Code.
- *
- */
-static DWORD get_local_monitors(DWORD level, LPBYTE pMonitors, DWORD cbBuf, LPDWORD lpreturned)
-{
-    HKEY    hroot = NULL;
-    HKEY    hentry = NULL;
-    LPWSTR  ptr;
-    LPMONITOR_INFO_2W mi;
-    WCHAR   buffer[MAX_PATH];
-    WCHAR   dllname[MAX_PATH];
-    DWORD   dllsize;
-    DWORD   len;
-    DWORD   index = 0;
-    DWORD   needed = 0;
-    DWORD   numentries;
-    DWORD   entrysize;
-
-    entrysize = (level == 1) ? sizeof(MONITOR_INFO_1W) : sizeof(MONITOR_INFO_2W);
-
-    numentries = *lpreturned;       /* this is 0, when we scan the registry */
-    len = entrysize * numentries;
-    ptr = (LPWSTR) &pMonitors[len];
-
-    numentries = 0;
-    len = sizeof(buffer)/sizeof(buffer[0]);
-    buffer[0] = '\0';
-
-    /* Windows creates the "Monitors"-Key on reboot / start "spooler" */
-    if (RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) == ERROR_SUCCESS) {
-        /* Scan all Monitor-Registry-Keys */
-        while (RegEnumKeyExW(hroot, index, buffer, &len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
-            TRACE("Monitor_%d: %s\n", numentries, debugstr_w(buffer));
-            dllsize = sizeof(dllname);
-            dllname[0] = '\0';
-
-            /* The Monitor must have a Driver-DLL */
-            if (RegOpenKeyExW(hroot, buffer, 0, KEY_READ, &hentry) == ERROR_SUCCESS) {
-                if (RegQueryValueExW(hentry, driverW, NULL, NULL, (LPBYTE) dllname, &dllsize) == ERROR_SUCCESS) {
-                    /* We found a valid DLL for this Monitor. */
-                    TRACE("using Driver: %s\n", debugstr_w(dllname));
-                }
-                RegCloseKey(hentry);
-            }
-
-            /* Windows returns only Port-Monitors here, but to simplify our code,
-               we do no filtering for Language-Monitors */
-            if (dllname[0]) {
-                numentries++;
-                needed += entrysize;
-                needed += (len+1) * sizeof(WCHAR);  /* len is lstrlenW(monitorname) */
-                if (level > 1) {
-                    /* we install and return only monitors for "Windows NT x86" */
-                    needed += (lstrlenW(x86_envnameW) +1) * sizeof(WCHAR);
-                    needed += dllsize;
-                }
-
-                /* required size is calculated. Now fill the user-buffer */
-                if (pMonitors && (cbBuf >= needed)){
-                    mi = (LPMONITOR_INFO_2W) pMonitors;
-                    pMonitors += entrysize;
-
-                    TRACE("%p: writing MONITOR_INFO_%dW #%d\n", mi, level, numentries);
-                    mi->pName = ptr;
-                    lstrcpyW(ptr, buffer);      /* Name of the Monitor */
-                    ptr += (len+1);               /* len is lstrlenW(monitorname) */
-                    if (level > 1) {
-                        mi->pEnvironment = ptr;
-                        lstrcpyW(ptr, x86_envnameW); /* fixed to "Windows NT x86" */
-                        ptr += (lstrlenW(x86_envnameW)+1);
-
-                        mi->pDLLName = ptr;
-                        lstrcpyW(ptr, dllname);         /* Name of the Driver-DLL */
-                        ptr += (dllsize / sizeof(WCHAR));
-                    }
-                }
-            }
-            index++;
-            len = sizeof(buffer)/sizeof(buffer[0]);
-            buffer[0] = '\0';
-        }
-        RegCloseKey(hroot);
-    }
-    *lpreturned = numentries;
-    TRACE("need %d byte for %d entries\n", needed, numentries);
-    return needed;
-}
-
-/*****************************************************************************
- * enumerate the local print processors (INTERNAL)
- *
- * returns the needed size (in bytes) for pPPInfo
- * and  *lpreturned is set to number of entries returned in pPPInfo
- *
- */
-static DWORD get_local_printprocessors(LPWSTR regpathW, LPBYTE pPPInfo, DWORD cbBuf, LPDWORD lpreturned)
-{
-    HKEY    hroot = NULL;
-    HKEY    hentry = NULL;
-    LPWSTR  ptr;
-    PPRINTPROCESSOR_INFO_1W ppi;
-    WCHAR   buffer[MAX_PATH];
-    WCHAR   dllname[MAX_PATH];
-    DWORD   dllsize;
-    DWORD   len;
-    DWORD   index = 0;
-    DWORD   needed = 0;
-    DWORD   numentries;
-
-    numentries = *lpreturned;       /* this is 0, when we scan the registry */
-    len = numentries * sizeof(PRINTPROCESSOR_INFO_1W);
-    ptr = (LPWSTR) &pPPInfo[len];
-
-    numentries = 0;
-    len = sizeof(buffer)/sizeof(buffer[0]);
-    buffer[0] = '\0';
-
-    if (RegCreateKeyW(HKEY_LOCAL_MACHINE, regpathW, &hroot) == ERROR_SUCCESS) {
-        /* add "winprint" first */
-        numentries++;
-        needed = sizeof(PRINTPROCESSOR_INFO_1W) + sizeof(winprintW);
-        if (pPPInfo && (cbBuf >= needed)){
-            ppi = (PPRINTPROCESSOR_INFO_1W) pPPInfo;
-            pPPInfo += sizeof(PRINTPROCESSOR_INFO_1W);
-
-            TRACE("%p: writing PRINTPROCESSOR_INFO_1W #%d\n", ppi, numentries);
-            ppi->pName = ptr;
-            lstrcpyW(ptr, winprintW);      /* Name of the Print Processor */
-            ptr += sizeof(winprintW) / sizeof(WCHAR);
-        }
-
-        /* Scan all Printprocessor Keys */
-        while ((RegEnumKeyExW(hroot, index, buffer, &len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) &&
-            (lstrcmpiW(buffer, winprintW) != 0)) {
-            TRACE("PrintProcessor_%d: %s\n", numentries, debugstr_w(buffer));
-            dllsize = sizeof(dllname);
-            dllname[0] = '\0';
-
-            /* The Print Processor must have a Driver-DLL */
-            if (RegOpenKeyExW(hroot, buffer, 0, KEY_READ, &hentry) == ERROR_SUCCESS) {
-                if (RegQueryValueExW(hentry, driverW, NULL, NULL, (LPBYTE) dllname, &dllsize) == ERROR_SUCCESS) {
-                    /* We found a valid DLL for this Print Processor */
-                    TRACE("using Driver: %s\n", debugstr_w(dllname));
-                }
-                RegCloseKey(hentry);
-            }
-
-            if (dllname[0]) {
-                numentries++;
-                needed += sizeof(PRINTPROCESSOR_INFO_1W);
-                needed += (len+1) * sizeof(WCHAR);  /* len is lstrlenW(printprocessor name) */
-
-                /* required size is calculated. Now fill the user-buffer */
-                if (pPPInfo && (cbBuf >= needed)){
-                    ppi = (PPRINTPROCESSOR_INFO_1W) pPPInfo;
-                    pPPInfo += sizeof(PRINTPROCESSOR_INFO_1W);
-
-                    TRACE("%p: writing PRINTPROCESSOR_INFO_1W #%d\n", ppi, numentries);
-                    ppi->pName = ptr;
-                    lstrcpyW(ptr, buffer);      /* Name of the Print Processor */
-                    ptr += (len+1);             /* len is lstrlenW(printprosessor name) */
-                }
-            }
-            index++;
-            len = sizeof(buffer)/sizeof(buffer[0]);
-            buffer[0] = '\0';
-        }
-        RegCloseKey(hroot);
-    }
-    *lpreturned = numentries;
-    TRACE("need %d byte for %d entries\n", needed, numentries);
-    return needed;
-}
-
-/******************************************************************
- * enumerate the local Ports from all loaded monitors (internal)
- *
- * returns the needed size (in bytes) for pPorts
- * and  *lpreturned is set to number of entries returned in pPorts
- *
- */
-static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf, LPDWORD lpreturned)
-{
-    monitor_t * pm;
-    LPWSTR      ptr;
-    LPPORT_INFO_2W cache;
-    LPPORT_INFO_2W out;
-    LPBYTE  pi_buffer = NULL;
-    DWORD   pi_allocated = 0;
-    DWORD   pi_needed;
-    DWORD   pi_index;
-    DWORD   pi_returned;
-    DWORD   res;
-    DWORD   outindex = 0;
-    DWORD   needed;
-    DWORD   numentries;
-    DWORD   entrysize;
-
-
-    TRACE("(%d, %p, %d, %p)\n", level, pPorts, cbBuf, lpreturned);
-    entrysize = (level == 1) ? sizeof(PORT_INFO_1W) : sizeof(PORT_INFO_2W);
-
-    numentries = *lpreturned;       /* this is 0, when we scan the registry */
-    needed = entrysize * numentries;
-    ptr = (LPWSTR) &pPorts[needed];
-
-    numentries = 0;
-    needed = 0;
-
-    LIST_FOR_EACH_ENTRY(pm, &monitor_handles, monitor_t, entry)
-    {
-        if ((pm->monitor) && (pm->monitor->pfnEnumPorts)) {
-            pi_needed = 0;
-            pi_returned = 0;
-            res = pm->monitor->pfnEnumPorts(NULL, level, pi_buffer, pi_allocated, &pi_needed, &pi_returned);
-            if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) {
-                /* Do not use heap_realloc (we do not need the old data in the buffer) */
-                heap_free(pi_buffer);
-                pi_buffer = heap_alloc(pi_needed);
-                pi_allocated = (pi_buffer) ? pi_needed : 0;
-                res = pm->monitor->pfnEnumPorts(NULL, level, pi_buffer, pi_allocated, &pi_needed, &pi_returned);
-            }
-            TRACE("(%s) got %d with %d (need %d byte for %d entries)\n",
-                  debugstr_w(pm->name), res, GetLastError(), pi_needed, pi_returned);
-
-            numentries += pi_returned;
-            needed += pi_needed;
-
-            /* fill the output-buffer (pPorts), if we have one */
-            if (pPorts && (cbBuf >= needed ) && pi_buffer) {
-                pi_index = 0;
-                while (pi_returned > pi_index) {
-                    cache = (LPPORT_INFO_2W) &pi_buffer[pi_index * entrysize];
-                    out = (LPPORT_INFO_2W) &pPorts[outindex * entrysize];
-                    out->pPortName = ptr;
-                    lstrcpyW(ptr, cache->pPortName);
-                    ptr += (lstrlenW(ptr)+1);
-                    if (level > 1) {
-                        out->pMonitorName = ptr;
-                        lstrcpyW(ptr,  cache->pMonitorName);
-                        ptr += (lstrlenW(ptr)+1);
-
-                        out->pDescription = ptr;
-                        lstrcpyW(ptr,  cache->pDescription);
-                        ptr += (lstrlenW(ptr)+1);
-                        out->fPortType = cache->fPortType;
-                        out->Reserved = cache->Reserved;
-                    }
-                    pi_index++;
-                    outindex++;
-                }
-            }
-        }
-    }
-    /* the temporary portinfo-buffer is no longer needed */
-    heap_free(pi_buffer);
-
-    *lpreturned = numentries;
-    TRACE("need %d byte for %d entries\n", needed, numentries);
-    return needed;
-}
-
-
-/*****************************************************************************
- * open_driver_reg [internal]
- *
- * opens the registry for the printer drivers depending on the given input
- * variable pEnvironment
- *
- * RETURNS:
- *    Success: the opened hkey
- *    Failure: NULL
- */
-static HKEY open_driver_reg(LPCWSTR pEnvironment)
-{
-    HKEY  retval = NULL;
-    LPWSTR buffer;
-    const printenv_t * env;
-
-    TRACE("(%s)\n", debugstr_w(pEnvironment));
-
-    env = validate_envW(pEnvironment);
-    if (!env) return NULL;
-
-    buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(fmt_driversW) +
-                (lstrlenW(env->envname) + lstrlenW(env->versionregpath)) * sizeof(WCHAR));
-
-    if (buffer) {
-        wsprintfW(buffer, fmt_driversW, env->envname, env->versionregpath);
-        RegCreateKeyW(HKEY_LOCAL_MACHINE, buffer, &retval);
-        HeapFree(GetProcessHeap(), 0, buffer);
-    }
-    return retval;
-}
-
-/*****************************************************************************
- * fpGetPrinterDriverDirectory [exported through PRINTPROVIDOR]
- *
- * Return the PATH for the Printer-Drivers
- *
- * PARAMS
- *   pName            [I] Servername (NT only) or NULL (local Computer)
- *   pEnvironment     [I] Printing-Environment (see below) or NULL (Default)
- *   Level            [I] Structure-Level (must be 1)
- *   pDriverDirectory [O] PTR to Buffer that receives the Result
- *   cbBuf            [I] Size of Buffer at pDriverDirectory
- *   pcbNeeded        [O] PTR to DWORD that receives the size in Bytes used /
- *                        required for pDriverDirectory
- *
- * RETURNS
- *   Success: TRUE  and in pcbNeeded the Bytes used in pDriverDirectory
- *   Failure: FALSE and in pcbNeeded the Bytes required for pDriverDirectory,
- *            if cbBuf is too small
- *
- *   Native Values returned in pDriverDirectory on Success:
- *|  NT(Windows NT x86):  "%winsysdir%\\spool\\DRIVERS\\w32x86"
- *|  NT(Windows 4.0):     "%winsysdir%\\spool\\DRIVERS\\win40"
- *|  win9x(Windows 4.0):  "%winsysdir%"
- *
- *   "%winsysdir%" is the Value from GetSystemDirectoryW()
- *
- */
-static BOOL WINAPI fpGetPrinterDriverDirectory(LPWSTR pName, LPWSTR pEnvironment,
-            DWORD Level, LPBYTE pDriverDirectory, DWORD cbBuf, LPDWORD pcbNeeded)
-{
-    DWORD needed;
-    const printenv_t * env;
-    WCHAR * const dir = (WCHAR *)pDriverDirectory;
-
-    TRACE("(%s, %s, %d, %p, %d, %p)\n", debugstr_w(pName),
-          debugstr_w(pEnvironment), Level, pDriverDirectory, cbBuf, pcbNeeded);
-
-    if (pName != NULL && pName[0]) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    env = validate_envW(pEnvironment);
-    if (!env) return FALSE;  /* pEnvironment invalid or unsupported */
-
-
-    /* GetSystemDirectoryW returns number of WCHAR including the '\0' */
-    needed = GetSystemDirectoryW(NULL, 0);
-    /* add the Size for the Subdirectories */
-    needed += lstrlenW(spoolW);
-    needed += lstrlenW(driversW);
-    needed += lstrlenW(env->subdir);
-    needed *= sizeof(WCHAR);  /* return-value is size in Bytes */
-
-    *pcbNeeded = needed;
-
-    if (needed > cbBuf) {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        return FALSE;
-    }
-
-    if (dir == NULL) {
-        /* ERROR_INVALID_USER_BUFFER is NT, ERROR_INVALID_PARAMETER is win9x */
-        SetLastError(ERROR_INVALID_USER_BUFFER);
-        return FALSE;
-    }
-
-    GetSystemDirectoryW( dir, cbBuf / sizeof(WCHAR) );
-    /* add the Subdirectories */
-    lstrcatW( dir, spoolW );
-    CreateDirectoryW( dir, NULL );
-    lstrcatW( dir, driversW );
-    CreateDirectoryW( dir, NULL );
-    lstrcatW( dir, env->subdir );
-    CreateDirectoryW( dir, NULL );
-
-    TRACE( "=> %s\n", debugstr_w( dir ) );
-    return TRUE;
-}
-
-/******************************************************************
- * driver_load [internal]
- *
- * load a driver user interface dll
- *
- * On failure, NULL is returned
- *
- */
-
-static HMODULE driver_load(const printenv_t * env, LPWSTR dllname)
-{
-    WCHAR fullname[MAX_PATH];
-    HMODULE hui;
-    DWORD len;
-
-    TRACE("(%p, %s)\n", env, debugstr_w(dllname));
-
-    /* build the driverdir */
-    len = sizeof(fullname) -
-          (lstrlenW(env->versionsubdir) + 1 + lstrlenW(dllname) + 1) * sizeof(WCHAR);
-
-    if (!fpGetPrinterDriverDirectory(NULL, (LPWSTR) env->envname, 1,
-                                     (LPBYTE) fullname, len, &len)) {
-        /* Should never fail */
-        SetLastError(ERROR_BUFFER_OVERFLOW);
-        return NULL;
-    }
-
-    lstrcatW(fullname, env->versionsubdir);
-    lstrcatW(fullname, backslashW);
-    lstrcatW(fullname, dllname);
-
-    hui = LoadLibraryW(fullname);
-    TRACE("%p: LoadLibrary(%s) %d\n", hui, debugstr_w(fullname), GetLastError());
-
-    return hui;
-}
-
-/******************************************************************
- *  printer_free
- *  free the data pointer of an opened printer
- */
-static VOID printer_free(printer_t * printer)
-{
-    if (printer->hXcv)
-        printer->pm->monitor->pfnXcvClosePort(printer->hXcv);
-
-    monitor_unload(printer->pm);
-
-    heap_free(printer->printername);
-    heap_free(printer->name);
-    heap_free(printer);
-}
-
-/******************************************************************
- *  printer_alloc_handle
- *  alloc a printer handle and remember the data pointer in the printer handle table
- *
- */
-static HANDLE printer_alloc_handle(LPCWSTR name, LPPRINTER_DEFAULTSW pDefault)
-{
-    WCHAR servername[MAX_COMPUTERNAME_LENGTH + 1];
-    printer_t *printer = NULL;
-    LPCWSTR printername;
-    HKEY    hkeyPrinters;
-    HKEY    hkeyPrinter;
-    DWORD   len;
-
-    if (copy_servername_from_name(name, servername)) {
-        FIXME("server %s not supported\n", debugstr_w(servername));
-        SetLastError(ERROR_INVALID_PRINTER_NAME);
-        return NULL;
-    }
-
-    printername = get_basename_from_name(name);
-    if (name != printername) TRACE("converted %s to %s\n", debugstr_w(name), debugstr_w(printername));
-
-    /* an empty printername is invalid */
-    if (printername && (!printername[0])) {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return NULL;
-    }
-
-    printer = heap_alloc_zero(sizeof(printer_t));
-    if (!printer) goto end;
-
-    /* clone the base name. This is NULL for the printserver */
-    printer->printername = strdupW(printername);
-
-    /* clone the full name */
-    printer->name = strdupW(name);
-    if (name && (!printer->name)) {
-        printer_free(printer);
-        printer = NULL;
-    }
-    if (printername) {
-        len = sizeof(XcvMonitorW)/sizeof(WCHAR) - 1;
-        if (strncmpW(printername, XcvMonitorW, len) == 0) {
-            /* OpenPrinter(",XcvMonitor ", ...) detected */
-            TRACE(",XcvMonitor: %s\n", debugstr_w(&printername[len]));
-            printer->pm = monitor_load(&printername[len], NULL);
-            if (printer->pm == NULL) {
-                printer_free(printer);
-                SetLastError(ERROR_UNKNOWN_PORT);
-                printer = NULL;
-                goto end;
-            }
-        }
-        else
-        {
-            len = sizeof(XcvPortW)/sizeof(WCHAR) - 1;
-            if (strncmpW( printername, XcvPortW, len) == 0) {
-                /* OpenPrinter(",XcvPort ", ...) detected */
-                TRACE(",XcvPort: %s\n", debugstr_w(&printername[len]));
-                printer->pm = monitor_load_by_port(&printername[len]);
-                if (printer->pm == NULL) {
-                    printer_free(printer);
-                    SetLastError(ERROR_UNKNOWN_PORT);
-                    printer = NULL;
-                    goto end;
-                }
-            }
-        }
-
-        if (printer->pm) {
-            if ((printer->pm->monitor) && (printer->pm->monitor->pfnXcvOpenPort)) {
-                printer->pm->monitor->pfnXcvOpenPort(&printername[len],
-                                                    pDefault ? pDefault->DesiredAccess : 0,
-                                                    &printer->hXcv);
-            }
-            if (printer->hXcv == NULL) {
-                printer_free(printer);
-                SetLastError(ERROR_INVALID_PARAMETER);
-                printer = NULL;
-                goto end;
-            }
-        }
-        else
-        {
-            /* Does the Printer exist? */
-            if (RegCreateKeyW(HKEY_LOCAL_MACHINE, printersW, &hkeyPrinters) != ERROR_SUCCESS) {
-                ERR("Can't create Printers key\n");
-                printer_free(printer);
-                SetLastError(ERROR_INVALID_PRINTER_NAME);
-                printer = NULL;
-                goto end;
-            }
-            if (RegOpenKeyW(hkeyPrinters, printername, &hkeyPrinter) != ERROR_SUCCESS) {
-                WARN("Printer not found in Registry: %s\n", debugstr_w(printername));
-                RegCloseKey(hkeyPrinters);
-                printer_free(printer);
-                SetLastError(ERROR_INVALID_PRINTER_NAME);
-                printer = NULL;
-                goto end;
-            }
-            RegCloseKey(hkeyPrinter);
-            RegCloseKey(hkeyPrinters);
-        }
-    }
-    else
-    {
-        TRACE("using the local printserver\n");
-    }
-
-end:
-
-    TRACE("==> %p\n", printer);
-    return (HANDLE)printer;
-}
-
-static inline WCHAR *get_file_part( WCHAR *name )
-{
-    WCHAR *ptr = strrchrW( name, '\\' );
-    if (ptr) return ptr + 1;
-    return name;
-}
-
-/******************************************************************************
- *  myAddPrinterDriverEx [internal]
- *
- * Install a Printer Driver with the Option to upgrade / downgrade the Files
- * and a special mode with lazy error checking.
- *
- */
-static BOOL myAddPrinterDriverEx(DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags, BOOL lazy)
-{
-    const printenv_t *env;
-    apd_data_t apd;
-    DRIVER_INFO_8W di;
-    BOOL    (WINAPI *pDrvDriverEvent)(DWORD, DWORD, LPBYTE, LPARAM);
-    HMODULE hui;
-    WCHAR *file;
-    HKEY    hroot;
-    HKEY    hdrv;
-    DWORD   disposition;
-    DWORD   len;
-    LONG    lres;
-    BOOL    res;
-
-    /* we need to set all entries in the Registry, independent from the Level of
-       DRIVER_INFO, that the caller supplied */
-
-    ZeroMemory(&di, sizeof(di));
-    if (pDriverInfo && (level < (sizeof(di_sizeof) / sizeof(di_sizeof[0])))) {
-        memcpy(&di, pDriverInfo, di_sizeof[level]);
-    }
-
-    /* dump the most used infos */
-    TRACE("%p: .cVersion    : 0x%x/%d\n", pDriverInfo, di.cVersion, di.cVersion);
-    TRACE("%p: .pName       : %s\n", di.pName, debugstr_w(di.pName));
-    TRACE("%p: .pEnvironment: %s\n", di.pEnvironment, debugstr_w(di.pEnvironment));
-    TRACE("%p: .pDriverPath : %s\n", di.pDriverPath, debugstr_w(di.pDriverPath));
-    TRACE("%p: .pDataFile   : %s\n", di.pDataFile, debugstr_w(di.pDataFile));
-    TRACE("%p: .pConfigFile : %s\n", di.pConfigFile, debugstr_w(di.pConfigFile));
-    TRACE("%p: .pHelpFile   : %s\n", di.pHelpFile, debugstr_w(di.pHelpFile));
-    /* dump only the first of the additional Files */
-    TRACE("%p: .pDependentFiles: %s\n", di.pDependentFiles, debugstr_w(di.pDependentFiles));
-
-
-    /* check environment */
-    env = validate_envW(di.pEnvironment);
-    if (env == NULL) return FALSE;        /* ERROR_INVALID_ENVIRONMENT */
-
-    /* fill the copy-data / get the driverdir */
-    len = sizeof(apd.src) - sizeof(version3_subdirW) - sizeof(WCHAR);
-    if (!fpGetPrinterDriverDirectory(NULL, (LPWSTR) env->envname, 1,
-                                    (LPBYTE) apd.src, len, &len)) {
-        /* Should never fail */
-        return FALSE;
-    }
-    memcpy(apd.dst, apd.src, len);
-    lstrcatW(apd.src, backslashW);
-    apd.srclen = lstrlenW(apd.src);
-    lstrcatW(apd.dst, env->versionsubdir);
-    lstrcatW(apd.dst, backslashW);
-    apd.dstlen = lstrlenW(apd.dst);
-    apd.copyflags = dwFileCopyFlags;
-    apd.lazy = lazy;
-    CreateDirectoryW(apd.src, NULL);
-    CreateDirectoryW(apd.dst, NULL);
-
-    hroot = open_driver_reg(env->envname);
-    if (!hroot) {
-        ERR("Can't create Drivers key\n");
-        return FALSE;
-    }
-
-    /* Fill the Registry for the Driver */
-    if ((lres = RegCreateKeyExW(hroot, di.pName, 0, NULL, REG_OPTION_NON_VOLATILE,
-                                KEY_WRITE | KEY_QUERY_VALUE, NULL,
-                                &hdrv, &disposition)) != ERROR_SUCCESS) {
-
-        ERR("can't create driver %s: %u\n", debugstr_w(di.pName), lres);
-        RegCloseKey(hroot);
-        SetLastError(lres);
-        return FALSE;
-    }
-    RegCloseKey(hroot);
-
-    /* Verified with the Adobe PS Driver, that w2k does not use di.Version */
-    RegSetValueExW(hdrv, versionW, 0, REG_DWORD, (const BYTE*) &env->driverversion,
-                   sizeof(DWORD));
-
-    file = get_file_part( di.pDriverPath );
-    RegSetValueExW( hdrv, driverW, 0, REG_SZ, (LPBYTE)file, (strlenW( file ) + 1) * sizeof(WCHAR) );
-    apd_copyfile( di.pDriverPath, file, &apd );
-
-    file = get_file_part( di.pDataFile );
-    RegSetValueExW( hdrv, data_fileW, 0, REG_SZ, (LPBYTE)file, (strlenW( file ) + 1) * sizeof(WCHAR) );
-    apd_copyfile( di.pDataFile, file, &apd );
-
-    file = get_file_part( di.pConfigFile );
-    RegSetValueExW( hdrv, configuration_fileW, 0, REG_SZ, (LPBYTE)file, (strlenW( file ) + 1) * sizeof(WCHAR) );
-    apd_copyfile( di.pConfigFile, file, &apd );
-
-    /* settings for level 3 */
-    if (di.pHelpFile)
-    {
-        file = get_file_part( di.pHelpFile );
-        RegSetValueExW( hdrv, help_fileW, 0, REG_SZ, (LPBYTE)file, (strlenW( file ) + 1) * sizeof(WCHAR) );
-        apd_copyfile( di.pHelpFile, file, &apd );
-    }
-    else
-        RegSetValueExW( hdrv, help_fileW, 0, REG_SZ, (const BYTE*)emptyW, sizeof(emptyW) );
-
-    if (di.pDependentFiles && *di.pDependentFiles)
-    {
-        WCHAR *reg, *reg_ptr, *in_ptr;
-        reg = reg_ptr = HeapAlloc( GetProcessHeap(), 0, multi_sz_lenW( di.pDependentFiles ) );
-
-        for (in_ptr = di.pDependentFiles; *in_ptr; in_ptr += strlenW( in_ptr ) + 1)
-        {
-            file = get_file_part( in_ptr );
-            len = strlenW( file ) + 1;
-            memcpy( reg_ptr, file, len * sizeof(WCHAR) );
-            reg_ptr += len;
-            apd_copyfile( in_ptr, file, &apd );
-        }
-        *reg_ptr = 0;
-
-        RegSetValueExW( hdrv, dependent_filesW, 0, REG_MULTI_SZ, (LPBYTE)reg, (reg_ptr - reg + 1) * sizeof(WCHAR) );
-        HeapFree( GetProcessHeap(), 0, reg );
-    }
-    else
-        RegSetValueExW(hdrv, dependent_filesW, 0, REG_MULTI_SZ, (const BYTE*)emptyW, sizeof(emptyW));
-
-    /* The language-Monitor was already copied by the caller to "%SystemRoot%\system32" */
-    if (di.pMonitorName)
-        RegSetValueExW(hdrv, monitorW, 0, REG_SZ, (LPBYTE) di.pMonitorName,
-                       (lstrlenW(di.pMonitorName)+1)* sizeof(WCHAR));
-    else
-        RegSetValueExW(hdrv, monitorW, 0, REG_SZ, (const BYTE*)emptyW, sizeof(emptyW));
-
-    if (di.pDefaultDataType)
-        RegSetValueExW(hdrv, datatypeW, 0, REG_SZ, (LPBYTE) di.pDefaultDataType,
-                       (lstrlenW(di.pDefaultDataType)+1)* sizeof(WCHAR));
-    else
-        RegSetValueExW(hdrv, datatypeW, 0, REG_SZ, (const BYTE*)emptyW, sizeof(emptyW));
-
-    /* settings for level 4 */
-    if (di.pszzPreviousNames)
-        RegSetValueExW(hdrv, previous_namesW, 0, REG_MULTI_SZ, (LPBYTE) di.pszzPreviousNames,
-                       multi_sz_lenW(di.pszzPreviousNames));
-    else
-        RegSetValueExW(hdrv, previous_namesW, 0, REG_MULTI_SZ, (const BYTE*)emptyW, sizeof(emptyW));
-
-    if (level > 5) TRACE("level %u for Driver %s is incomplete\n", level, debugstr_w(di.pName));
-
-    RegCloseKey(hdrv);
-    hui = driver_load(env, di.pConfigFile);
-    pDrvDriverEvent = (void *)GetProcAddress(hui, "DrvDriverEvent");
-    if (hui && pDrvDriverEvent) {
-
-        /* Support for DrvDriverEvent is optional */
-        TRACE("DRIVER_EVENT_INITIALIZE for %s (%s)\n", debugstr_w(di.pName), debugstr_w(di.pConfigFile));
-        /* MSDN: level for DRIVER_INFO is 1 to 3 */
-        res = pDrvDriverEvent(DRIVER_EVENT_INITIALIZE, 3, (LPBYTE) &di, 0);
-        TRACE("got %d from DRIVER_EVENT_INITIALIZE\n", res);
-    }
-    FreeLibrary(hui);
-
-    TRACE("=> TRUE with %u\n", GetLastError());
-    return TRUE;
-
-}
-
-/******************************************************************************
- * fpAddMonitor [exported through PRINTPROVIDOR]
- *
- * Install a Printmonitor
- *
- * PARAMS
- *  pName       [I] Servername or NULL (local Computer)
- *  Level       [I] Structure-Level (Must be 2)
- *  pMonitors   [I] PTR to MONITOR_INFO_2
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  All Files for the Monitor must already be copied to %winsysdir% ("%SystemRoot%\system32")
- *
- */
-static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
-{
-    monitor_t * pm = NULL;
-    LPMONITOR_INFO_2W mi2w;
-    HKEY    hroot = NULL;
-    HKEY    hentry = NULL;
-    DWORD   disposition;
-    BOOL    res = FALSE;
-
-    mi2w = (LPMONITOR_INFO_2W) pMonitors;
-    TRACE("(%s, %d, %p): %s %s %s\n", debugstr_w(pName), Level, pMonitors,
-            debugstr_w(mi2w ? mi2w->pName : NULL),
-            debugstr_w(mi2w ? mi2w->pEnvironment : NULL),
-            debugstr_w(mi2w ? mi2w->pDLLName : NULL));
-
-    if (copy_servername_from_name(pName, NULL)) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_ACCESS_DENIED);
-        return FALSE;
-    }
-
-    if (!mi2w->pName || (! mi2w->pName[0])) {
-        WARN("pName not valid : %s\n", debugstr_w(mi2w->pName));
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-    if (!mi2w->pEnvironment || lstrcmpW(mi2w->pEnvironment, x86_envnameW)) {
-        WARN("Environment %s requested (we support only %s)\n",
-                debugstr_w(mi2w->pEnvironment), debugstr_w(x86_envnameW));
-        SetLastError(ERROR_INVALID_ENVIRONMENT);
-        return FALSE;
-    }
-
-    if (!mi2w->pDLLName || (! mi2w->pDLLName[0])) {
-        WARN("pDLLName not valid : %s\n", debugstr_w(mi2w->pDLLName));
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    /* Load and initialize the monitor. SetLastError() is called on failure */
-    if ((pm = monitor_load(mi2w->pName, mi2w->pDLLName)) == NULL) {
-        return FALSE;
-    }
-    monitor_unload(pm);
-
-    if (RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) != ERROR_SUCCESS) {
-        ERR("unable to create key %s\n", debugstr_w(monitorsW));
-        return FALSE;
-    }
-
-    if (RegCreateKeyExW(hroot, mi2w->pName, 0, NULL, REG_OPTION_NON_VOLATILE,
-                        KEY_WRITE | KEY_QUERY_VALUE, NULL, &hentry,
-                        &disposition) == ERROR_SUCCESS) {
-
-        /* Some installers set options for the port before calling AddMonitor.
-           We query the "Driver" entry to verify that the monitor is installed,
-           before we return an error.
-           When a user installs two print monitors at the same time with the
-           same name, a race condition is possible but silently ignored. */
-
-        DWORD   namesize = 0;
-
-        if ((disposition == REG_OPENED_EXISTING_KEY) &&
-            (RegQueryValueExW(hentry, driverW, NULL, NULL, NULL,
-                              &namesize) == ERROR_SUCCESS)) {
-            TRACE("monitor %s already exists\n", debugstr_w(mi2w->pName));
-            /* 9x use ERROR_ALREADY_EXISTS */
-            SetLastError(ERROR_PRINT_MONITOR_ALREADY_INSTALLED);
-        }
-        else
-        {
-            INT len;
-            len = (lstrlenW(mi2w->pDLLName) +1) * sizeof(WCHAR);
-            res = (RegSetValueExW(hentry, driverW, 0, REG_SZ,
-                    (LPBYTE) mi2w->pDLLName, len) == ERROR_SUCCESS);
-        }
-        RegCloseKey(hentry);
-    }
-
-    RegCloseKey(hroot);
-    return (res);
-}
-
-/******************************************************************************
- * fpAddPort [exported through PRINTPROVIDOR]
- *
- * Add a Port for a specific Monitor
- *
- * PARAMS
- *  pName        [I] Servername or NULL (local Computer)
- *  hWnd         [I] Handle to parent Window for the Dialog-Box
- *  pMonitorName [I] Name of the Monitor that manage the Port
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI fpAddPort(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName)
-{
-    monitor_t * pm;
-    monitor_t * pui;
-    LONG        lres;
-    DWORD       res;
-
-    TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pMonitorName));
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    /* an empty Monitorname is Invalid */
-    if (!pMonitorName[0]) {
-        SetLastError(ERROR_NOT_SUPPORTED);
-        return FALSE;
-    }
-
-    pm = monitor_load(pMonitorName, NULL);
-    if (pm && pm->monitor && pm->monitor->pfnAddPort) {
-        res = pm->monitor->pfnAddPort(pName, hWnd, pMonitorName);
-        TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pm->dllname));
-    }
-    else
-    {
-        pui = monitor_loadui(pm);
-        if (pui && pui->monitorUI && pui->monitorUI->pfnAddPortUI) {
-            res = pui->monitorUI->pfnAddPortUI(pName, hWnd, pMonitorName, NULL);
-            TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pui->dllname));
-        }
-        else
-        {
-            FIXME("not implemented for %s (monitor %p: %s / monitorui %p: %s)\n",
-                    debugstr_w(pMonitorName), pm, debugstr_w(pm ? pm->dllname : NULL),
-                    pui, debugstr_w(pui ? pui->dllname : NULL));
-
-            SetLastError(ERROR_NOT_SUPPORTED);
-            res = FALSE;
-        }
-        monitor_unload(pui);
-    }
-    monitor_unload(pm);
-
-    TRACE("returning %d with %u\n", res, GetLastError());
-    return res;
-}
-
-/******************************************************************************
- * fpAddPortEx [exported through PRINTPROVIDOR]
- *
- * Add a Port for a specific Monitor, without presenting a user interface
- *
- * PARAMS
- *  pName         [I] Servername or NULL (local Computer)
- *  level         [I] Structure-Level (1 or 2) for pBuffer
- *  pBuffer       [I] PTR to: PORT_INFO_1 or PORT_INFO_2
- *  pMonitorName  [I] Name of the Monitor that manage the Port
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI fpAddPortEx(LPWSTR pName, DWORD level, LPBYTE pBuffer, LPWSTR pMonitorName)
-{
-    PORT_INFO_2W * pi2;
-    monitor_t * pm;
-    DWORD lres;
-    DWORD res;
-
-    pi2 = (PORT_INFO_2W *) pBuffer;
-
-    TRACE("(%s, %d, %p, %s): %s %s %s\n", debugstr_w(pName), level, pBuffer,
-            debugstr_w(pMonitorName), debugstr_w(pi2 ? pi2->pPortName : NULL),
-            debugstr_w(((level > 1) && pi2) ? pi2->pMonitorName : NULL),
-            debugstr_w(((level > 1) && pi2) ? pi2->pDescription : NULL));
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    if ((level < 1) || (level > 2)) {
-        SetLastError(ERROR_INVALID_LEVEL);
-        return FALSE;
-    }
-
-    if ((!pi2) || (!pMonitorName) || (!pMonitorName[0])) {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    /* load the Monitor */
-    pm = monitor_load(pMonitorName, NULL);
-    if (pm && pm->monitor && pm->monitor->pfnAddPortEx) {
-        res = pm->monitor->pfnAddPortEx(pName, level, pBuffer, pMonitorName);
-        TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pm->dllname));
-    }
-    else
-    {
-        FIXME("not implemented for %s (monitor %p: %s)\n",
-            debugstr_w(pMonitorName), pm, pm ? debugstr_w(pm->dllname) : "(null)");
-            SetLastError(ERROR_INVALID_PARAMETER);
-            res = FALSE;
-    }
-    monitor_unload(pm);
-    return res;
-}
-
-/******************************************************************************
- * fpAddPrinterDriverEx [exported through PRINTPROVIDOR]
- *
- * Install a Printer Driver with the Option to upgrade / downgrade the Files
- *
- * PARAMS
- *  pName           [I] Servername or NULL (local Computer)
- *  level           [I] Level for the supplied DRIVER_INFO_*W struct
- *  pDriverInfo     [I] PTR to DRIVER_INFO_*W struct with the Driver Parameter
- *  dwFileCopyFlags [I] How to Copy / Upgrade / Downgrade the needed Files
- *
- * RESULTS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI fpAddPrinterDriverEx(LPWSTR pName, DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags)
-{
-    LONG lres;
-
-    TRACE("(%s, %d, %p, 0x%x)\n", debugstr_w(pName), level, pDriverInfo, dwFileCopyFlags);
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_ACCESS_DENIED);
-        return FALSE;
-    }
-
-    if ((dwFileCopyFlags & ~APD_COPY_FROM_DIRECTORY) != APD_COPY_ALL_FILES) {
-        TRACE("Flags 0x%x ignored (using APD_COPY_ALL_FILES)\n", dwFileCopyFlags & ~APD_COPY_FROM_DIRECTORY);
-    }
-
-    return myAddPrinterDriverEx(level, pDriverInfo, dwFileCopyFlags, TRUE);
-}
-
-/******************************************************************************
- * fpClosePrinter [exported through PRINTPROVIDOR]
- *
- * Close a printer handle and free associated resources
- *
- * PARAMS
- *  hPrinter [I] Printerhandle to close
- *
- * RESULTS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI fpClosePrinter(HANDLE hPrinter)
-{
-    printer_t *printer = (printer_t *) hPrinter;
-
-    TRACE("(%p)\n", hPrinter);
-
-    if (printer) {
-        printer_free(printer);
-        return TRUE;
-    }
-    return FALSE;
-}
-
-/******************************************************************************
- * fpConfigurePort [exported through PRINTPROVIDOR]
- *
- * Display the Configuration-Dialog for a specific Port
- *
- * PARAMS
- *  pName     [I] Servername or NULL (local Computer)
- *  hWnd      [I] Handle to parent Window for the Dialog-Box
- *  pPortName [I] Name of the Port, that should be configured
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI fpConfigurePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
-{
-    monitor_t * pm;
-    monitor_t * pui;
-    LONG        lres;
-    DWORD       res;
-
-    TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_NAME);
-        return FALSE;
-    }
-
-    /* an empty Portname is Invalid, but can popup a Dialog */
-    if (!pPortName[0]) {
-        SetLastError(ERROR_NOT_SUPPORTED);
-        return FALSE;
-    }
-
-    pm = monitor_load_by_port(pPortName);
-    if (pm && pm->monitor && pm->monitor->pfnConfigurePort) {
-        TRACE("use %s for %s (monitor %p: %s)\n", debugstr_w(pm->name),
-                debugstr_w(pPortName), pm, debugstr_w(pm->dllname));
-        res = pm->monitor->pfnConfigurePort(pName, hWnd, pPortName);
-        TRACE("got %d with %u\n", res, GetLastError());
-    }
-    else
-    {
-        pui = monitor_loadui(pm);
-        if (pui && pui->monitorUI && pui->monitorUI->pfnConfigurePortUI) {
-            TRACE("use %s for %s (monitorui %p: %s)\n", debugstr_w(pui->name),
-                        debugstr_w(pPortName), pui, debugstr_w(pui->dllname));
-            res = pui->monitorUI->pfnConfigurePortUI(pName, hWnd, pPortName);
-            TRACE("got %d with %u\n", res, GetLastError());
-        }
-        else
-        {
-            FIXME("not implemented for %s (monitor %p: %s / monitorui %p: %s)\n",
-                    debugstr_w(pPortName), pm, debugstr_w(pm ? pm->dllname : NULL),
-                    pui, debugstr_w(pui ? pui->dllname : NULL));
-
-            SetLastError(ERROR_NOT_SUPPORTED);
-            res = FALSE;
-        }
-        monitor_unload(pui);
-    }
-    monitor_unload(pm);
-
-    TRACE("returning %d with %u\n", res, GetLastError());
-    return res;
-}
-
-/******************************************************************
- * fpDeleteMonitor [exported through PRINTPROVIDOR]
- *
- * Delete a specific Printmonitor from a Printing-Environment
- *
- * PARAMS
- *  pName        [I] Servername or NULL (local Computer)
- *  pEnvironment [I] Printing-Environment of the Monitor or NULL (Default)
- *  pMonitorName [I] Name of the Monitor, that should be deleted
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  pEnvironment is ignored in Windows for the local Computer.
- *
- */
-
-static BOOL WINAPI fpDeleteMonitor(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pMonitorName)
-{
-    HKEY    hroot = NULL;
-    LONG    lres;
-
-    TRACE("(%s, %s, %s)\n",debugstr_w(pName),debugstr_w(pEnvironment),
-           debugstr_w(pMonitorName));
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_NAME);
-        return FALSE;
-    }
-
-    /*  pEnvironment is ignored in Windows for the local Computer */
-    if (!pMonitorName || !pMonitorName[0]) {
-        TRACE("pMonitorName %s is invalid\n", debugstr_w(pMonitorName));
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    if(RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) != ERROR_SUCCESS) {
-        ERR("unable to create key %s\n", debugstr_w(monitorsW));
-        return FALSE;
-    }
-
-    if(SHDeleteKeyW(hroot, pMonitorName) == ERROR_SUCCESS) {
-        TRACE("%s deleted\n", debugstr_w(pMonitorName));
-        RegCloseKey(hroot);
-        return TRUE;
-    }
-
-    TRACE("%s does not exist\n", debugstr_w(pMonitorName));
-    RegCloseKey(hroot);
-
-    /* NT: ERROR_UNKNOWN_PRINT_MONITOR (3000), 9x: ERROR_INVALID_PARAMETER (87) */
-    SetLastError(ERROR_UNKNOWN_PRINT_MONITOR);
-    return FALSE;
-}
-
-/*****************************************************************************
- * fpDeletePort [exported through PRINTPROVIDOR]
- *
- * Delete a specific Port
- *
- * PARAMS
- *  pName     [I] Servername or NULL (local Computer)
- *  hWnd      [I] Handle to parent Window for the Dialog-Box
- *  pPortName [I] Name of the Port, that should be deleted
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-static BOOL WINAPI fpDeletePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
-{
-    monitor_t * pm;
-    monitor_t * pui;
-    LONG        lres;
-    DWORD       res;
-
-    TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_NAME);
-        return FALSE;
-    }
-
-    /* an empty Portname is Invalid */
-    if (!pPortName[0]) {
-        SetLastError(ERROR_NOT_SUPPORTED);
-        return FALSE;
-    }
-
-    pm = monitor_load_by_port(pPortName);
-    if (pm && pm->monitor && pm->monitor->pfnDeletePort) {
-        TRACE("use %s for %s (monitor %p: %s)\n", debugstr_w(pm->name),
-                debugstr_w(pPortName), pm, debugstr_w(pm->dllname));
-        res = pm->monitor->pfnDeletePort(pName, hWnd, pPortName);
-        TRACE("got %d with %u\n", res, GetLastError());
-    }
-    else
-    {
-        pui = monitor_loadui(pm);
-        if (pui && pui->monitorUI && pui->monitorUI->pfnDeletePortUI) {
-            TRACE("use %s for %s (monitorui %p: %s)\n", debugstr_w(pui->name),
-                        debugstr_w(pPortName), pui, debugstr_w(pui->dllname));
-            res = pui->monitorUI->pfnDeletePortUI(pName, hWnd, pPortName);
-            TRACE("got %d with %u\n", res, GetLastError());
-        }
-        else
-        {
-            FIXME("not implemented for %s (monitor %p: %s / monitorui %p: %s)\n",
-                    debugstr_w(pPortName), pm, debugstr_w(pm ? pm->dllname : NULL),
-                    pui, debugstr_w(pui ? pui->dllname : NULL));
-
-            SetLastError(ERROR_NOT_SUPPORTED);
-            res = FALSE;
-        }
-        monitor_unload(pui);
-    }
-    monitor_unload(pm);
-
-    TRACE("returning %d with %u\n", res, GetLastError());
-    return res;
-}
-
-/*****************************************************************************
- * fpEnumMonitors [exported through PRINTPROVIDOR]
- *
- * Enumerate available Port-Monitors
- *
- * PARAMS
- *  pName      [I] Servername or NULL (local Computer)
- *  Level      [I] Structure-Level (1:Win9x+NT or 2:NT only)
- *  pMonitors  [O] PTR to Buffer that receives the Result
- *  cbBuf      [I] Size of Buffer at pMonitors
- *  pcbNeeded  [O] PTR to DWORD that receives the size in Bytes used / required for pMonitors
- *  pcReturned [O] PTR to DWORD that receives the number of Monitors in pMonitors
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pMonitors, if cbBuf is too small
- *
- * NOTES
- *  Windows reads the Registry once and cache the Results.
- *
- */
-static BOOL WINAPI fpEnumMonitors(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cbBuf,
-                                  LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
-    DWORD   numentries = 0;
-    DWORD   needed = 0;
-    LONG    lres;
-    BOOL    res = FALSE;
-
-    TRACE("(%s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), Level, pMonitors,
-          cbBuf, pcbNeeded, pcReturned);
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_NAME);
-        goto em_cleanup;
-    }
-
-    if (!Level || (Level > 2)) {
-        WARN("level (%d) is ignored in win9x\n", Level);
-        SetLastError(ERROR_INVALID_LEVEL);
-        return FALSE;
-    }
-
-    /* Scan all Monitor-Keys */
-    numentries = 0;
-    needed = get_local_monitors(Level, NULL, 0, &numentries);
-
-    /* we calculated the needed buffersize. now do more error-checks */
-    if (cbBuf < needed) {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        goto em_cleanup;
-    }
-
-    /* fill the Buffer with the Monitor-Keys */
-    needed = get_local_monitors(Level, pMonitors, cbBuf, &numentries);
-    res = TRUE;
-
-em_cleanup:
-    if (pcbNeeded)  *pcbNeeded = needed;
-    if (pcReturned) *pcReturned = numentries;
-
-    TRACE("returning %d with %d (%d byte for %d entries)\n",
-            res, GetLastError(), needed, numentries);
-
-    return (res);
-}
-
-/******************************************************************************
- * fpEnumPorts [exported through PRINTPROVIDOR]
- *
- * Enumerate available Ports
- *
- * PARAMS
- *  pName      [I] Servername or NULL (local Computer)
- *  Level      [I] Structure-Level (1 or 2)
- *  pPorts     [O] PTR to Buffer that receives the Result
- *  cbBuf      [I] Size of Buffer at pPorts
- *  pcbNeeded  [O] PTR to DWORD that receives the size in Bytes used / required for pPorts
- *  pcReturned [O] PTR to DWORD that receives the number of Ports in pPorts
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pPorts, if cbBuf is too small
- *
- */
-static BOOL WINAPI fpEnumPorts(LPWSTR pName, DWORD Level, LPBYTE pPorts, DWORD cbBuf,
-                               LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
-    DWORD   needed = 0;
-    DWORD   numentries = 0;
-    LONG    lres;
-    BOOL    res = FALSE;
-
-    TRACE("(%s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), Level, pPorts,
-          cbBuf, pcbNeeded, pcReturned);
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_NAME);
-        goto emP_cleanup;
-    }
-
-    if (!Level || (Level > 2)) {
-        SetLastError(ERROR_INVALID_LEVEL);
-        goto emP_cleanup;
-    }
-
-    if (!pcbNeeded || (!pPorts && (cbBuf > 0))) {
-        SetLastError(RPC_X_NULL_REF_POINTER);
-        goto emP_cleanup;
-    }
-
-    EnterCriticalSection(&monitor_handles_cs);
-    monitor_loadall();
-
-    /* Scan all local Ports */
-    numentries = 0;
-    needed = get_ports_from_all_monitors(Level, NULL, 0, &numentries);
-
-    /* we calculated the needed buffersize. now do the error-checks */
-    if (cbBuf < needed) {
-        monitor_unloadall();
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        goto emP_cleanup_cs;
-    }
-    else if (!pPorts || !pcReturned) {
-        monitor_unloadall();
-        SetLastError(RPC_X_NULL_REF_POINTER);
-        goto emP_cleanup_cs;
-    }
-
-    /* Fill the Buffer */
-    needed = get_ports_from_all_monitors(Level, pPorts, cbBuf, &numentries);
-    res = TRUE;
-    monitor_unloadall();
-
-emP_cleanup_cs:
-    LeaveCriticalSection(&monitor_handles_cs);
-
-emP_cleanup:
-    if (pcbNeeded)  *pcbNeeded = needed;
-    if (pcReturned) *pcReturned = (res) ? numentries : 0;
-
-    TRACE("returning %d with %d (%d byte for %d of %d entries)\n",
-          (res), GetLastError(), needed, (res) ? numentries : 0, numentries);
-
-    return (res);
-}
-
-/*****************************************************************************
- * fpEnumPrintProcessors [exported through PRINTPROVIDOR]
- *
- * Enumerate available Print Processors
- *
- * PARAMS
- *  pName        [I] Servername or NULL (local Computer)
- *  pEnvironment [I] Printing-Environment or NULL (Default)
- *  Level        [I] Structure-Level (Only 1 is allowed)
- *  pPPInfo      [O] PTR to Buffer that receives the Result
- *  cbBuf        [I] Size of Buffer at pMonitors
- *  pcbNeeded    [O] PTR to DWORD that receives the size in Bytes used / required for pPPInfo
- *  pcReturned   [O] PTR to DWORD that receives the number of Print Processors in pPPInfo
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pPPInfo, if cbBuf is too small
- *
- */
-static BOOL WINAPI fpEnumPrintProcessors(LPWSTR pName, LPWSTR pEnvironment, DWORD Level,
-                            LPBYTE pPPInfo, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
-    const printenv_t * env;
-    LPWSTR  regpathW = NULL;
-    DWORD   numentries = 0;
-    DWORD   needed = 0;
-    LONG    lres;
-    BOOL    res = FALSE;
-
-    TRACE("(%s, %s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), debugstr_w(pEnvironment),
-                                Level, pPPInfo, cbBuf, pcbNeeded, pcReturned);
-
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(ERROR_INVALID_NAME);
-        goto epp_cleanup;
-    }
-
-    if (Level != 1) {
-        SetLastError(ERROR_INVALID_LEVEL);
-        goto epp_cleanup;
-    }
-
-    env = validate_envW(pEnvironment);
-    if (!env)
-        goto epp_cleanup;   /* ERROR_INVALID_ENVIRONMENT */
-
-    regpathW = heap_alloc(sizeof(fmt_printprocessorsW) +
-                            (lstrlenW(env->envname) * sizeof(WCHAR)));
-
-    if (!regpathW)
-        goto epp_cleanup;
-
-    wsprintfW(regpathW, fmt_printprocessorsW, env->envname);
-
-    /* Scan all Printprocessor-Keys */
-    numentries = 0;
-    needed = get_local_printprocessors(regpathW, NULL, 0, &numentries);
-
-    /* we calculated the needed buffersize. now do more error-checks */
-    if (cbBuf < needed) {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        goto epp_cleanup;
-    }
-
-    /* fill the Buffer with the Printprocessor Infos */
-    needed = get_local_printprocessors(regpathW, pPPInfo, cbBuf, &numentries);
-    res = TRUE;
-
-epp_cleanup:
-    heap_free(regpathW);
-    if (pcbNeeded)  *pcbNeeded = needed;
-    if (pcReturned) *pcReturned = numentries;
-
-    TRACE("returning %d with %d (%d byte for %d entries)\n",
-            res, GetLastError(), needed, numentries);
-
-    return (res);
-}
-
-/******************************************************************************
- * fpGetPrintProcessorDirectory [exported through PRINTPROVIDOR]
- *
- * Return the PATH for the Print-Processors
- *
- * PARAMS
- *  pName        [I] Servername or NULL (this computer)
- *  pEnvironment [I] Printing-Environment or NULL (Default)
- *  level        [I] Structure-Level (must be 1)
- *  pPPInfo      [O] PTR to Buffer that receives the Result
- *  cbBuf        [I] Size of Buffer at pPPInfo
- *  pcbNeeded    [O] PTR to DWORD that receives the size in Bytes used / required for pPPInfo
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pPPInfo, if cbBuf is too small
- *
- *  Native Values returned in pPPInfo on Success for this computer:
- *| NT(Windows x64):    "%winsysdir%\\spool\\PRTPROCS\\x64"
- *| NT(Windows NT x86): "%winsysdir%\\spool\\PRTPROCS\\w32x86"
- *| NT(Windows 4.0):    "%winsysdir%\\spool\\PRTPROCS\\win40"
- *
- *  "%winsysdir%" is the Value from GetSystemDirectoryW()
- *
- */
-static BOOL WINAPI fpGetPrintProcessorDirectory(LPWSTR pName, LPWSTR pEnvironment, DWORD level,
-                                                LPBYTE pPPInfo, DWORD cbBuf, LPDWORD pcbNeeded)
-{
-    const printenv_t * env;
-    DWORD needed;
-    LONG  lres;
-
-    TRACE("(%s, %s, %d, %p, %d, %p)\n", debugstr_w(pName), debugstr_w(pEnvironment),
-                                        level, pPPInfo, cbBuf, pcbNeeded);
-
-    *pcbNeeded = 0;
-    lres = copy_servername_from_name(pName, NULL);
-    if (lres) {
-        FIXME("server %s not supported\n", debugstr_w(pName));
-        SetLastError(RPC_S_SERVER_UNAVAILABLE);
-        return FALSE;
-    }
-
-    env = validate_envW(pEnvironment);
-    if (!env)
-        return FALSE;   /* ERROR_INVALID_ENVIRONMENT */
-
-    /* GetSystemDirectoryW returns number of WCHAR including the '\0' */
-    needed = GetSystemDirectoryW(NULL, 0);
-    /* add the Size for the Subdirectories */
-    needed += lstrlenW(spoolprtprocsW);
-    needed += lstrlenW(env->subdir);
-    needed *= sizeof(WCHAR);  /* return-value is size in Bytes */
-
-    *pcbNeeded = needed;
-
-    if (needed > cbBuf) {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        return FALSE;
-    }
-
-    GetSystemDirectoryW((LPWSTR) pPPInfo, cbBuf/sizeof(WCHAR));
-    /* add the Subdirectories */
-    lstrcatW((LPWSTR) pPPInfo, spoolprtprocsW);
-    lstrcatW((LPWSTR) pPPInfo, env->subdir);
-    TRACE("==> %s\n", debugstr_w((LPWSTR) pPPInfo));
-    return TRUE;
-}
-
-/******************************************************************************
- * fpOpenPrinter [exported through PRINTPROVIDOR]
- *
- * Open a Printer / Printserver or a Printer-Object
- *
- * PARAMS
- *  lpPrinterName [I] Name of Printserver, Printer, or Printer-Object
- *  pPrinter      [O] The resulting Handle is stored here
- *  pDefaults     [I] PTR to Default Printer Settings or NULL
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  lpPrinterName is one of:
- *|  Printserver (NT only): "Servername" or NULL for the local Printserver
- *|  Printer: "PrinterName"
- *|  Printer-Object: "PrinterName,Job xxx"
- *|  XcvMonitor: "Servername,XcvMonitor MonitorName"
- *|  XcvPort: "Servername,XcvPort PortName"
- *
- *
- */
-static BOOL WINAPI fpOpenPrinter(LPWSTR lpPrinterName, HANDLE *pPrinter,
-                                 LPPRINTER_DEFAULTSW pDefaults)
-{
-
-    TRACE("(%s, %p, %p)\n", debugstr_w(lpPrinterName), pPrinter, pDefaults);
-
-    *pPrinter = printer_alloc_handle(lpPrinterName, pDefaults);
-
-    return (*pPrinter != 0);
-}
-
-/******************************************************************************
- * fpXcvData [exported through PRINTPROVIDOR]
- *
- * Execute commands in the Printmonitor DLL
- *
- * PARAMS
- *  hXcv            [i] Handle from fpOpenPrinter (with XcvMonitor or XcvPort)
- *  pszDataName     [i] Name of the command to execute
- *  pInputData      [i] Buffer for extra Input Data (needed only for some commands)
- *  cbInputData     [i] Size in Bytes of Buffer at pInputData
- *  pOutputData     [o] Buffer to receive additional Data (needed only for some commands)
- *  cbOutputData    [i] Size in Bytes of Buffer at pOutputData
- *  pcbOutputNeeded [o] PTR to receive the minimal Size in Bytes of the Buffer at pOutputData
- *  pdwStatus       [o] PTR to receive the win32 error code from the Printmonitor DLL
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  Returning "TRUE" does mean, that the Printmonitor DLL was called successful.
- *  The execution of the command can still fail (check pdwStatus for ERROR_SUCCESS).
- *
- *  Minimal List of commands, that a Printmonitor DLL should support:
- *
- *| "MonitorUI" : Return the Name of the Userinterface-DLL as WSTR in pOutputData
- *| "AddPort"   : Add a Port
- *| "DeletePort": Delete a Port
- *
- *  Many Printmonitors support additional commands. Examples for localspl.dll:
- *  "GetDefaultCommConfig", "SetDefaultCommConfig",
- *  "GetTransmissionRetryTimeout", "ConfigureLPTPortCommandOK"
- *
- */
-static BOOL WINAPI fpXcvData(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
-                    DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData,
-                    PDWORD pcbOutputNeeded, PDWORD pdwStatus)
-{
-    printer_t *printer = (printer_t * ) hXcv;
-
-    TRACE("(%p, %s, %p, %d, %p, %d, %p, %p)\n", hXcv, debugstr_w(pszDataName),
-          pInputData, cbInputData, pOutputData,
-          cbOutputData, pcbOutputNeeded, pdwStatus);
-
-    if (!printer || (!printer->hXcv)) {
-        SetLastError(ERROR_INVALID_HANDLE);
-        return FALSE;
-    }
-
-    if (!pcbOutputNeeded) {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    if (!pszDataName || !pdwStatus || (!pOutputData && (cbOutputData > 0))) {
-        SetLastError(RPC_X_NULL_REF_POINTER);
-        return FALSE;
-    }
-
-    *pcbOutputNeeded = 0;
-
-    *pdwStatus = printer->pm->monitor->pfnXcvDataPort(printer->hXcv, pszDataName,
-            pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded);
-
-    return TRUE;
-}
-
-/*****************************************************
- *  setup_provider [internal]
- */
-void setup_provider(void)
-{
-    static const PRINTPROVIDOR backend = {
-        fpOpenPrinter,
-        NULL,   /* fpSetJob */
-        NULL,   /* fpGetJob */
-        NULL,   /* fpEnumJobs */
-        NULL,   /* fpAddPrinter */
-        NULL,   /* fpDeletePrinter */
-        NULL,   /* fpSetPrinter */
-        NULL,   /* fpGetPrinter */
-        NULL,   /* fpEnumPrinters */
-        NULL,   /* fpAddPrinterDriver */
-        NULL,   /* fpEnumPrinterDrivers */
-        NULL,   /* fpGetPrinterDriver */
-        fpGetPrinterDriverDirectory,
-        NULL,   /* fpDeletePrinterDriver */
-        NULL,   /* fpAddPrintProcessor */
-        fpEnumPrintProcessors,
-        fpGetPrintProcessorDirectory,
-        NULL,   /* fpDeletePrintProcessor */
-        NULL,   /* fpEnumPrintProcessorDatatypes */
-        NULL,   /* fpStartDocPrinter */
-        NULL,   /* fpStartPagePrinter */
-        NULL,   /* fpWritePrinter */
-        NULL,   /* fpEndPagePrinter */
-        NULL,   /* fpAbortPrinter */
-        NULL,   /* fpReadPrinter */
-        NULL,   /* fpEndDocPrinter */
-        NULL,   /* fpAddJob */
-        NULL,   /* fpScheduleJob */
-        NULL,   /* fpGetPrinterData */
-        NULL,   /* fpSetPrinterData */
-        NULL,   /* fpWaitForPrinterChange */
-        fpClosePrinter,
-        NULL,   /* fpAddForm */
-        NULL,   /* fpDeleteForm */
-        NULL,   /* fpGetForm */
-        NULL,   /* fpSetForm */
-        NULL,   /* fpEnumForms */
-        fpEnumMonitors,
-        fpEnumPorts,
-        fpAddPort,
-        fpConfigurePort,
-        fpDeletePort,
-        NULL,   /* fpCreatePrinterIC */
-        NULL,   /* fpPlayGdiScriptOnPrinterIC */
-        NULL,   /* fpDeletePrinterIC */
-        NULL,   /* fpAddPrinterConnection */
-        NULL,   /* fpDeletePrinterConnection */
-        NULL,   /* fpPrinterMessageBox */
-        fpAddMonitor,
-        fpDeleteMonitor,
-        NULL,   /* fpResetPrinter */
-        NULL,   /* fpGetPrinterDriverEx */
-        NULL,   /* fpFindFirstPrinterChangeNotification */
-        NULL,   /* fpFindClosePrinterChangeNotification */
-        fpAddPortEx,
-        NULL,   /* fpShutDown */
-        NULL,   /* fpRefreshPrinterChangeNotification */
-        NULL,   /* fpOpenPrinterEx */
-        NULL,   /* fpAddPrinterEx */
-        NULL,   /* fpSetPort */
-        NULL,   /* fpEnumPrinterData */
-        NULL,   /* fpDeletePrinterData */
-        NULL,   /* fpClusterSplOpen */
-        NULL,   /* fpClusterSplClose */
-        NULL,   /* fpClusterSplIsAlive */
-        NULL,   /* fpSetPrinterDataEx */
-        NULL,   /* fpGetPrinterDataEx */
-        NULL,   /* fpEnumPrinterDataEx */
-        NULL,   /* fpEnumPrinterKey */
-        NULL,   /* fpDeletePrinterDataEx */
-        NULL,   /* fpDeletePrinterKey */
-        NULL,   /* fpSeekPrinter */
-        NULL,   /* fpDeletePrinterDriverEx */
-        NULL,   /* fpAddPerMachineConnection */
-        NULL,   /* fpDeletePerMachineConnection */
-        NULL,   /* fpEnumPerMachineConnections */
-        fpXcvData,
-        fpAddPrinterDriverEx,
-        NULL,   /* fpSplReadPrinter */
-        NULL,   /* fpDriverUnloadComplete */
-        NULL,   /* fpGetSpoolFileInfo */
-        NULL,   /* fpCommitSpoolData */
-        NULL,   /* fpCloseSpoolFileHandle */
-        NULL,   /* fpFlushPrinter */
-        NULL,   /* fpSendRecvBidiData */
-        NULL    /* fpAddDriverCatalog */
-    };
-    pprovider = &backend;
-
-}
-
-/*****************************************************
- * InitializePrintProvidor     (localspl.@)
- *
- * Initialize the Printprovider
- *
- * PARAMS
- *  pPrintProvidor    [I] Buffer to fill with a struct PRINTPROVIDOR
- *  cbPrintProvidor   [I] Size of Buffer in Bytes
- *  pFullRegistryPath [I] Registry-Path for the Printprovidor
- *
- * RETURNS
- *  Success: TRUE and pPrintProvidor filled
- *  Failure: FALSE
- *
- * NOTES
- *  The RegistryPath should be:
- *  "System\CurrentControlSet\Control\Print\Providers\<providername>",
- *  but this Parameter is ignored in "localspl.dll".
- *
- */
-
-BOOL WINAPI InitializePrintProvidor(LPPRINTPROVIDOR pPrintProvidor,
-                                    DWORD cbPrintProvidor, LPWSTR pFullRegistryPath)
-{
-
-    TRACE("(%p, %u, %s)\n", pPrintProvidor, cbPrintProvidor, debugstr_w(pFullRegistryPath));
-    memcpy(pPrintProvidor, pprovider,
-          (cbPrintProvidor < sizeof(PRINTPROVIDOR)) ? cbPrintProvidor : sizeof(PRINTPROVIDOR));
-
-    return TRUE;
-}
diff --git a/reactos/dll/win32/localspl/resource.h b/reactos/dll/win32/localspl/resource.h
deleted file mode 100644 (file)
index 6a961f9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-/* ## Resource-ID ## */
-#define IDS_LOCALPORT       500
-#define IDS_LOCALMONITOR    507
-
-/* ## Reserved memorysize for the strings (in WCHAR) ## */
-#define IDS_LOCALMONITOR_MAXLEN 64
-#define IDS_LOCALPORT_MAXLEN 32
diff --git a/reactos/dll/win32/spoolss/CMakeLists.txt b/reactos/dll/win32/spoolss/CMakeLists.txt
deleted file mode 100644 (file)
index 41785c5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-add_definitions(-D__WINESRC__)
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-spec2def(spoolss.dll spoolss.spec ADD_IMPORTLIB)
-
-list(APPEND SOURCE
-    spoolss_main.c
-    router.c
-    spoolss.h
-    ${CMAKE_CURRENT_BINARY_DIR}/spoolss_stubs.c)
-
-add_library(spoolss SHARED
-    ${SOURCE}
-    ${CMAKE_CURRENT_BINARY_DIR}/spoolss.def)
-
-set_module_type(spoolss win32dll)
-target_link_libraries(spoolss wine)
-add_importlibs(spoolss msvcrt kernel32 ntdll)
-add_pch(spoolss spoolss.h SOURCE)
-add_cd_file(TARGET spoolss DESTINATION reactos/system32 FOR all)
diff --git a/reactos/dll/win32/spoolss/router.c b/reactos/dll/win32/spoolss/router.c
deleted file mode 100644 (file)
index 53a2d3f..0000000
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Routing for Spooler-Service helper DLL
- *
- * Copyright 2006-2009 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "spoolss.h"
-
-#include <winreg.h>
-#include <wingdi.h>
-#include <winspool.h>
-
-#include <ddk/winsplp.h>
-
-/* ################################ */
-
-#define MAX_BACKEND 3
-
-typedef struct {
-    /* PRINTPROVIDOR functions */
-    DWORD  (WINAPI *fpOpenPrinter)(LPWSTR, HANDLE *, LPPRINTER_DEFAULTSW);
-    DWORD  (WINAPI *fpSetJob)(HANDLE, DWORD, DWORD, LPBYTE, DWORD);
-    DWORD  (WINAPI *fpGetJob)(HANDLE, DWORD, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpEnumJobs)(HANDLE, DWORD, DWORD, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    HANDLE (WINAPI *fpAddPrinter)(LPWSTR, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpDeletePrinter)(HANDLE);
-    DWORD  (WINAPI *fpSetPrinter)(HANDLE, DWORD, LPBYTE, DWORD);
-    DWORD  (WINAPI *fpGetPrinter)(HANDLE, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpEnumPrinters)(DWORD, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpAddPrinterDriver)(LPWSTR, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpEnumPrinterDrivers)(LPWSTR, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpGetPrinterDriver)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpGetPrinterDriverDirectory)(LPWSTR, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpDeletePrinterDriver)(LPWSTR, LPWSTR, LPWSTR);
-    DWORD  (WINAPI *fpAddPrintProcessor)(LPWSTR, LPWSTR, LPWSTR, LPWSTR);
-    DWORD  (WINAPI *fpEnumPrintProcessors)(LPWSTR, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpGetPrintProcessorDirectory)(LPWSTR, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpDeletePrintProcessor)(LPWSTR, LPWSTR, LPWSTR);
-    DWORD  (WINAPI *fpEnumPrintProcessorDatatypes)(LPWSTR, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpStartDocPrinter)(HANDLE, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpStartPagePrinter)(HANDLE);
-    DWORD  (WINAPI *fpWritePrinter)(HANDLE, LPVOID, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpEndPagePrinter)(HANDLE);
-    DWORD  (WINAPI *fpAbortPrinter)(HANDLE);
-    DWORD  (WINAPI *fpReadPrinter)(HANDLE, LPVOID, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpEndDocPrinter)(HANDLE);
-    DWORD  (WINAPI *fpAddJob)(HANDLE, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpScheduleJob)(HANDLE, DWORD);
-    DWORD  (WINAPI *fpGetPrinterData)(HANDLE, LPWSTR, LPDWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpSetPrinterData)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD);
-    DWORD  (WINAPI *fpWaitForPrinterChange)(HANDLE, DWORD);
-    DWORD  (WINAPI *fpClosePrinter)(HANDLE);
-    DWORD  (WINAPI *fpAddForm)(HANDLE, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpDeleteForm)(HANDLE, LPWSTR);
-    DWORD  (WINAPI *fpGetForm)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpSetForm)(HANDLE, LPWSTR, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpEnumForms)(HANDLE, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpEnumMonitors)(LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpEnumPorts)(LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpAddPort)(LPWSTR, HWND, LPWSTR);
-    DWORD  (WINAPI *fpConfigurePort)(LPWSTR, HWND, LPWSTR);
-    DWORD  (WINAPI *fpDeletePort)(LPWSTR, HWND, LPWSTR);
-    HANDLE (WINAPI *fpCreatePrinterIC)(HANDLE, LPDEVMODEW);
-    DWORD  (WINAPI *fpPlayGdiScriptOnPrinterIC)(HANDLE, LPBYTE, DWORD, LPBYTE, DWORD, DWORD);
-    DWORD  (WINAPI *fpDeletePrinterIC)(HANDLE);
-    DWORD  (WINAPI *fpAddPrinterConnection)(LPWSTR);
-    DWORD  (WINAPI *fpDeletePrinterConnection)(LPWSTR);
-    DWORD  (WINAPI *fpPrinterMessageBox)(HANDLE, DWORD, HWND, LPWSTR, LPWSTR, DWORD);
-    DWORD  (WINAPI *fpAddMonitor)(LPWSTR, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpDeleteMonitor)(LPWSTR, LPWSTR, LPWSTR);
-    DWORD  (WINAPI *fpResetPrinter)(HANDLE, LPPRINTER_DEFAULTSW);
-    DWORD  (WINAPI *fpGetPrinterDriverEx)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, DWORD, DWORD, PDWORD, PDWORD);
-    HANDLE (WINAPI *fpFindFirstPrinterChangeNotification)(HANDLE, DWORD, DWORD, LPVOID);
-    DWORD  (WINAPI *fpFindClosePrinterChangeNotification)(HANDLE);
-    DWORD  (WINAPI *fpAddPortEx)(HANDLE, LPWSTR, DWORD, LPBYTE, LPWSTR);
-    DWORD  (WINAPI *fpShutDown)(LPVOID);
-    DWORD  (WINAPI *fpRefreshPrinterChangeNotification)(HANDLE, DWORD, PVOID, PVOID);
-    DWORD  (WINAPI *fpOpenPrinterEx)(LPWSTR, LPHANDLE, LPPRINTER_DEFAULTSW, LPBYTE, DWORD);
-    HANDLE (WINAPI *fpAddPrinterEx)(LPWSTR, DWORD, LPBYTE, LPBYTE, DWORD);
-    DWORD  (WINAPI *fpSetPort)(LPWSTR, LPWSTR, DWORD, LPBYTE);
-    DWORD  (WINAPI *fpEnumPrinterData)(HANDLE, DWORD, LPWSTR, DWORD, LPDWORD, LPDWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpDeletePrinterData)(HANDLE, LPWSTR);
-    DWORD  (WINAPI *fpClusterSplOpen)(LPCWSTR, LPCWSTR, PHANDLE, LPCWSTR, LPCWSTR);
-    DWORD  (WINAPI *fpClusterSplClose)(HANDLE);
-    DWORD  (WINAPI *fpClusterSplIsAlive)(HANDLE);
-    DWORD  (WINAPI *fpSetPrinterDataEx)(HANDLE, LPCWSTR, LPCWSTR, DWORD, LPBYTE, DWORD);
-    DWORD  (WINAPI *fpGetPrinterDataEx)(HANDLE, LPCWSTR, LPCWSTR, LPDWORD, LPBYTE, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpEnumPrinterDataEx)(HANDLE, LPCWSTR, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpEnumPrinterKey)(HANDLE, LPCWSTR, LPWSTR, DWORD, LPDWORD);
-    DWORD  (WINAPI *fpDeletePrinterDataEx)(HANDLE, LPCWSTR, LPCWSTR);
-    DWORD  (WINAPI *fpDeletePrinterKey)(HANDLE hPrinter, LPCWSTR pKeyName);
-    DWORD  (WINAPI *fpSeekPrinter)(HANDLE, LARGE_INTEGER, PLARGE_INTEGER, DWORD, BOOL);
-    DWORD  (WINAPI *fpDeletePrinterDriverEx)(LPWSTR, LPWSTR, LPWSTR, DWORD, DWORD);
-    DWORD  (WINAPI *fpAddPerMachineConnection)(LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR);
-    DWORD  (WINAPI *fpDeletePerMachineConnection)(LPCWSTR, LPCWSTR);
-    DWORD  (WINAPI *fpEnumPerMachineConnections)(LPCWSTR, LPBYTE, DWORD, LPDWORD, LPDWORD);
-    DWORD  (WINAPI *fpXcvData)(HANDLE, LPCWSTR, PBYTE, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
-    DWORD  (WINAPI *fpAddPrinterDriverEx)(LPWSTR, DWORD, LPBYTE, DWORD);
-    DWORD  (WINAPI *fpSplReadPrinter)(HANDLE, LPBYTE *, DWORD);
-    DWORD  (WINAPI *fpDriverUnloadComplete)(LPWSTR);
-    DWORD  (WINAPI *fpGetSpoolFileInfo)(HANDLE, LPWSTR *, LPHANDLE, HANDLE, HANDLE);
-    DWORD  (WINAPI *fpCommitSpoolData)(HANDLE, DWORD);
-    DWORD  (WINAPI *fpCloseSpoolFileHandle)(HANDLE);
-    DWORD  (WINAPI *fpFlushPrinter)(HANDLE, LPBYTE, DWORD, LPDWORD, DWORD);
-    DWORD  (WINAPI *fpSendRecvBidiData)(HANDLE, LPCWSTR, LPBIDI_REQUEST_CONTAINER, LPBIDI_RESPONSE_CONTAINER *);
-    DWORD  (WINAPI *fpAddDriverCatalog)(HANDLE, DWORD, VOID *, DWORD);
-    /* Private Data */
-    HMODULE dll;
-    LPWSTR  dllname;
-    LPWSTR  name;
-    LPWSTR  regroot;
-    DWORD   index;
-} backend_t;
-
-/* ################################ */
-
-static backend_t *backend[MAX_BACKEND];
-static DWORD used_backends = 0;
-
-static CRITICAL_SECTION backend_cs;
-static CRITICAL_SECTION_DEBUG backend_cs_debug =
-{
-    0, 0, &backend_cs,
-    { &backend_cs_debug.ProcessLocksList, &backend_cs_debug.ProcessLocksList },
-      0, 0, { (DWORD_PTR)(__FILE__ ": backend_cs") }
-};
-static CRITICAL_SECTION backend_cs = { &backend_cs_debug, -1, 0, 0, 0, 0 };
-
-/* ################################ */
-
-static WCHAR localsplW[] = {'l','o','c','a','l','s','p','l','.','d','l','l',0};
-
-/******************************************************************
- * strdupW [internal]
- *
- * create a copy of a unicode-string
- *
- */
-
-static LPWSTR strdupW(LPCWSTR p)
-{
-    LPWSTR ret;
-    DWORD len;
-
-    if(!p) return NULL;
-    len = (lstrlenW(p) + 1) * sizeof(WCHAR);
-    ret = heap_alloc(len);
-    memcpy(ret, p, len);
-    return ret;
-}
-
-/******************************************************************
- * backend_unload_all [internal]
- *
- * unload all backends
- */
-void backend_unload_all(void)
-{
-    EnterCriticalSection(&backend_cs);
-    while (used_backends > 0) {
-        used_backends--;
-        FreeLibrary(backend[used_backends]->dll);
-        heap_free(backend[used_backends]->dllname);
-        heap_free(backend[used_backends]->name);
-        heap_free(backend[used_backends]->regroot);
-        heap_free(backend[used_backends]);
-        backend[used_backends] = NULL;
-    }
-    LeaveCriticalSection(&backend_cs);
-}
-
-/******************************************************************************
- * backend_load [internal]
- *
- * load and init a backend
- *
- * PARAMS
- *  name   [I] Printprovider to use for the backend. NULL for the local print provider
- *
- * RETURNS
- *  Success: PTR to the backend
- *  Failure: NULL
- *
- */
-static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot)
-{
-
-    BOOL (WINAPI *pInitializePrintProvidor)(LPPRINTPROVIDOR, DWORD, LPWSTR);
-    DWORD id;
-    DWORD res;
-
-    TRACE("(%s, %s, %s)\n", debugstr_w(dllname), debugstr_w(name), debugstr_w(regroot));
-
-    EnterCriticalSection(&backend_cs);
-    id = used_backends;
-
-    backend[id] = heap_alloc_zero(sizeof(backend_t));
-    if (!backend[id]) {
-        LeaveCriticalSection(&backend_cs);
-        return NULL;
-    }
-
-    backend[id]->dllname = strdupW(dllname);
-    backend[id]->name = strdupW(name);
-    backend[id]->regroot = strdupW(regroot);
-
-    backend[id]->dll = LoadLibraryW(dllname);
-    if (backend[id]->dll) {
-        pInitializePrintProvidor = (void *) GetProcAddress(backend[id]->dll, "InitializePrintProvidor");
-        if (pInitializePrintProvidor) {
-
-            /* native localspl does not clear unused entries */
-            res = pInitializePrintProvidor((PRINTPROVIDOR *) backend[id], sizeof(PRINTPROVIDOR), regroot);
-            if (res) {
-                used_backends++;
-                backend[id]->index = used_backends;
-                LeaveCriticalSection(&backend_cs);
-                TRACE("--> backend #%d: %p (%s)\n", id, backend[id], debugstr_w(dllname));
-                return backend[id];
-            }
-        }
-        FreeLibrary(backend[id]->dll);
-    }
-    heap_free(backend[id]->dllname);
-    heap_free(backend[id]->name);
-    heap_free(backend[id]->regroot);
-    heap_free(backend[id]);
-    backend[id] = NULL;
-    LeaveCriticalSection(&backend_cs);
-    WARN("failed to init %s: %u\n", debugstr_w(dllname), GetLastError());
-    return NULL;
-}
-
-/******************************************************************************
- * backend_load_all [internal]
- *
- * load and init all backends
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-BOOL backend_load_all(void)
-{
-    static BOOL failed = FALSE;
-
-    EnterCriticalSection(&backend_cs);
-
-    /* if we failed before, don't try again */
-    if (!failed && (used_backends == 0)) {
-        backend_load(localsplW, NULL, NULL);
-
-        /* ToDo: parse the registry and load all other backends */
-
-        failed = (used_backends == 0);
-    }
-    LeaveCriticalSection(&backend_cs);
-    TRACE("-> %d\n", !failed);
-    return (!failed);
-}
-
-/******************************************************************************
- * backend_first [internal]
- *
- * find the first usable backend
- *
- * RETURNS
- *  Success: PTR to the backend
- *  Failure: NULL
- *
- */
-static backend_t * backend_first(LPWSTR name)
-{
-
-    EnterCriticalSection(&backend_cs);
-    /* Load all backends, when not done yet */
-    if (used_backends || backend_load_all()) {
-
-        /* test for the local system first */
-        if (!name || !name[0]) {
-            LeaveCriticalSection(&backend_cs);
-            return backend[0];
-        }
-    }
-
-    FIXME("server %s not supported in %d backends\n", debugstr_w(name), used_backends);
-    LeaveCriticalSection(&backend_cs);
-    return NULL;
-}
-
-/******************************************************************
- * AddMonitorW (spoolss.@)
- *
- * Install a Printmonitor
- *
- * PARAMS
- *  pName       [I] Servername or NULL (local Computer)
- *  Level       [I] Structure-Level (Must be 2)
- *  pMonitors   [I] PTR to MONITOR_INFO_2
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  All Files for the Monitor must already be copied to %winsysdir% ("%SystemRoot%\system32")
- *
- */
-BOOL WINAPI AddMonitorW(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
-{
-    backend_t * pb;
-    DWORD res = ROUTER_UNKNOWN;
-
-    TRACE("(%s, %d, %p)\n", debugstr_w(pName), Level, pMonitors);
-
-    if (Level != 2) {
-        SetLastError(ERROR_INVALID_LEVEL);
-        return FALSE;
-    }
-
-    pb = backend_first(pName);
-    if (pb && pb->fpAddMonitor)
-        res = pb->fpAddMonitor(pName, Level, pMonitors);
-    else
-    {
-        SetLastError(ERROR_PROC_NOT_FOUND);
-    }
-
-    TRACE("got %u with %u\n", res, GetLastError());
-    return (res == ROUTER_SUCCESS);
-}
-
-/******************************************************************
- * AddPrinterDriverExW (spoolss.@)
- *
- * Install a Printer Driver with the Option to upgrade / downgrade the Files
- *
- * PARAMS
- *  pName           [I] Servername or NULL (local Computer)
- *  level           [I] Level for the supplied DRIVER_INFO_*W struct
- *  pDriverInfo     [I] PTR to DRIVER_INFO_*W struct with the Driver Parameter
- *  dwFileCopyFlags [I] How to Copy / Upgrade / Downgrade the needed Files
- *
- * RESULTS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-BOOL WINAPI AddPrinterDriverExW(LPWSTR pName, DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags)
-{
-    backend_t * pb;
-    DWORD res = ROUTER_UNKNOWN;
-
-    TRACE("(%s, %d, %p, 0x%x)\n", debugstr_w(pName), level, pDriverInfo, dwFileCopyFlags);
-
-    if (!pDriverInfo) {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
-
-    pb = backend_first(pName);
-    if (pb && pb->fpAddPrinterDriverEx)
-        res = pb->fpAddPrinterDriverEx(pName, level, pDriverInfo, dwFileCopyFlags);
-    else
-    {
-        SetLastError(ERROR_PROC_NOT_FOUND);
-    }
-
-    TRACE("got %u with %u\n", res, GetLastError());
-    return (res == ROUTER_SUCCESS);
-}
-
-/******************************************************************
- * DeleteMonitorW (spoolss.@)
- *
- * Delete a specific Printmonitor from a Printing-Environment
- *
- * PARAMS
- *  pName        [I] Servername or NULL (local Computer)
- *  pEnvironment [I] Printing-Environment of the Monitor or NULL (Default)
- *  pMonitorName [I] Name of the Monitor, that should be deleted
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- */
-BOOL WINAPI DeleteMonitorW(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pMonitorName)
-{
-    backend_t * pb;
-    DWORD res = ROUTER_UNKNOWN;
-
-    TRACE("(%s, %s, %s)\n", debugstr_w(pName), debugstr_w(pEnvironment), debugstr_w(pMonitorName));
-
-    pb = backend_first(pName);
-    if (pb && pb->fpDeleteMonitor)
-        res = pb->fpDeleteMonitor(pName, pEnvironment, pMonitorName);
-    else
-    {
-        SetLastError(ERROR_PROC_NOT_FOUND);
-    }
-
-    TRACE("got %u with %u\n", res, GetLastError());
-    return (res == ROUTER_SUCCESS);
-}
-
-/******************************************************************
- * EnumMonitorsW (spoolss.@)
- *
- * Enumerate available Port-Monitors
- *
- * PARAMS
- *  pName      [I] Servername or NULL (local Computer)
- *  Level      [I] Structure-Level
- *  pMonitors  [O] PTR to Buffer that receives the Result
- *  cbBuf      [I] Size of Buffer at pMonitors
- *  pcbNeeded  [O] PTR to DWORD that receives the size in Bytes used / required for pMonitors
- *  pcReturned [O] PTR to DWORD that receives the number of Monitors in pMonitors
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pMonitors, if cbBuf is too small
- *
- */
-BOOL WINAPI EnumMonitorsW(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cbBuf,
-                          LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
-    backend_t * pb;
-    DWORD res = ROUTER_UNKNOWN;
-
-    TRACE("(%s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), Level, pMonitors,
-          cbBuf, pcbNeeded, pcReturned);
-
-    if (pcbNeeded) *pcbNeeded = 0;
-    if (pcReturned) *pcReturned = 0;
-
-    pb = backend_first(pName);
-    if (pb && pb->fpEnumMonitors)
-        res = pb->fpEnumMonitors(pName, Level, pMonitors, cbBuf, pcbNeeded, pcReturned);
-    else
-    {
-        SetLastError(ERROR_PROC_NOT_FOUND);
-    }
-
-    TRACE("got %u with %u (%u byte for %u entries)\n\n", res, GetLastError(),
-            pcbNeeded ? *pcbNeeded : 0, pcReturned ? *pcReturned : 0);
-
-    return (res == ROUTER_SUCCESS);
-}
-
-/******************************************************************
- * EnumPortsW (spoolss.@)
- *
- * Enumerate available Ports
- *
- * PARAMS
- *  pName      [I] Servername or NULL (local Computer)
- *  Level      [I] Structure-Level (1 or 2)
- *  pPorts     [O] PTR to Buffer that receives the Result
- *  cbBuf      [I] Size of Buffer at pPorts
- *  pcbNeeded  [O] PTR to DWORD that receives the size in Bytes used / required for pPorts
- *  pcReturned [O] PTR to DWORD that receives the number of Ports in pPorts
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE and in pcbNeeded the Bytes required for pPorts, if cbBuf is too small
- *
- */
-BOOL WINAPI EnumPortsW(LPWSTR pName, DWORD Level, LPBYTE pPorts, DWORD cbBuf,
-                       LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
-    backend_t * pb;
-    DWORD res = ROUTER_UNKNOWN;
-
-    TRACE("(%s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), Level, pPorts, cbBuf,
-            pcbNeeded, pcReturned);
-
-    if (pcbNeeded) *pcbNeeded = 0;
-    if (pcReturned) *pcReturned = 0;
-
-    pb = backend_first(pName);
-    if (pb && pb->fpEnumPorts)
-        res = pb->fpEnumPorts(pName, Level, pPorts, cbBuf, pcbNeeded, pcReturned);
-    else
-    {
-        SetLastError(ERROR_PROC_NOT_FOUND);
-    }
-
-    TRACE("got %u with %u (%u byte for %u entries)\n", res, GetLastError(),
-            pcbNeeded ? *pcbNeeded : 0, pcReturned ? *pcReturned : 0);
-
-    return (res == ROUTER_SUCCESS);
-}
-
-/******************************************************************
- * GetPrinterDriverDirectoryW (spoolss.@)
- *
- * Return the PATH for the Printer-Drivers
- *
- * PARAMS
- *   pName            [I] Servername or NULL (local Computer)
- *   pEnvironment     [I] Printing-Environment or NULL (Default)
- *   Level            [I] Structure-Level (must be 1)
- *   pDriverDirectory [O] PTR to Buffer that receives the Result
- *   cbBuf            [I] Size of Buffer at pDriverDirectory
- *   pcbNeeded        [O] PTR to DWORD that receives the size in Bytes used /
- *                        required for pDriverDirectory
- *
- * RETURNS
- *   Success: TRUE  and in pcbNeeded the Bytes used in pDriverDirectory
- *   Failure: FALSE and in pcbNeeded the Bytes required for pDriverDirectory,
- *   if cbBuf is too small
- *
- *   Native Values returned in pDriverDirectory on Success:
- *|  NT(Windows NT x86): "%winsysdir%\\spool\\DRIVERS\\w32x86"
- *|  NT(Windows x64):    "%winsysdir%\\spool\\DRIVERS\\x64"
- *|  NT(Windows 4.0):    "%winsysdir%\\spool\\DRIVERS\\win40"
- *|  win9x(Windows 4.0): "%winsysdir%"
- *
- *   "%winsysdir%" is the Value from GetSystemDirectoryW()
- *
- */
-BOOL WINAPI GetPrinterDriverDirectoryW(LPWSTR pName, LPWSTR pEnvironment,
-            DWORD Level, LPBYTE pDriverDirectory, DWORD cbBuf, LPDWORD pcbNeeded)
-{
-    backend_t * pb;
-    DWORD res = ROUTER_UNKNOWN;
-
-    TRACE("(%s, %s, %d, %p, %d, %p)\n", debugstr_w(pName),
-          debugstr_w(pEnvironment), Level, pDriverDirectory, cbBuf, pcbNeeded);
-
-    if (pcbNeeded) *pcbNeeded = 0;
-
-    pb = backend_first(pName);
-    if (pb && pb->fpGetPrinterDriverDirectory)
-        res = pb->fpGetPrinterDriverDirectory(pName, pEnvironment, Level,
-                                              pDriverDirectory, cbBuf, pcbNeeded);
-    else
-    {
-        SetLastError(ERROR_PROC_NOT_FOUND);
-    }
-
-    TRACE("got %u with %u (%u byte)\n",
-            res, GetLastError(), pcbNeeded ? *pcbNeeded : 0);
-
-    return (res == ROUTER_SUCCESS);
-
-}
diff --git a/reactos/dll/win32/spoolss/spoolss.h b/reactos/dll/win32/spoolss/spoolss.h
deleted file mode 100644 (file)
index 80fae4d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2006-2009 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef _SPOOLSS_H_
-#define _SPOOLSS_H_
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#include <windef.h>
-#include <winbase.h>
-
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(spoolss);
-
-/* ################################ */
-
-BOOL backend_load_all(void) DECLSPEC_HIDDEN;
-void backend_unload_all(void) DECLSPEC_HIDDEN;
-
-/* ## Memory allocation functions ## */
-
-static inline void * __WINE_ALLOC_SIZE(1) heap_alloc( size_t len )
-{
-    return HeapAlloc( GetProcessHeap(), 0, len );
-}
-
-static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero( size_t len )
-{
-    return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len );
-}
-
-static inline BOOL heap_free( void *mem )
-{
-    return HeapFree( GetProcessHeap(), 0, mem );
-}
-
-#endif /* _SPOOLSS_H_ */
diff --git a/reactos/dll/win32/spoolss/spoolss.spec b/reactos/dll/win32/spoolss/spoolss.spec
deleted file mode 100644 (file)
index 68188ba..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-@ stub AbortPrinter
-@ stub AddFormW
-@ stub AddJobW
-@ stdcall AddMonitorW(wstr long ptr)
-@ stub AddPerMachineConnectionW
-@ stub AddPortExW
-@ stub AddPortW
-@ stub AddPrintProcessorW
-@ stub AddPrintProvidorW
-@ stub AddPrinterConnectionW
-@ stdcall AddPrinterDriverExW(wstr long ptr long)
-@ stub AddPrinterDriverW
-@ stub AddPrinterExW
-@ stub AddPrinterW
-@ stdcall AllocSplStr(wstr)
-@ stub AppendPrinterNotifyInfoData
-@ stdcall BuildOtherNamesFromMachineName(ptr ptr)
-@ stub CallDrvDevModeConversion
-@ stub CallRouterFindFirstPrinterChangeNotification
-@ stub ClosePrinter
-@ stub ClusterSplClose
-@ stub ClusterSplIsAlive
-@ stub ClusterSplOpen
-@ stub ConfigurePortW
-@ stub CreatePrinterIC
-@ stub DbgGetPointers
-@ stub DeleteFormW
-@ stdcall DeleteMonitorW(wstr wstr wstr)
-@ stub DeletePerMachineConnectionW
-@ stub DeletePortW
-@ stub DeletePrintProcessorW
-@ stub DeletePrintProvidorW
-@ stub DeletePrinter
-@ stub DeletePrinterConnectionW
-@ stub DeletePrinterDataExW
-@ stub DeletePrinterDataW
-@ stub DeletePrinterDriverExW
-@ stub DeletePrinterDriverW
-@ stub DeletePrinterIC
-@ stub DeletePrinterKeyW
-@ stdcall DllAllocSplMem(long)
-@ stdcall DllFreeSplMem(ptr)
-@ stdcall DllFreeSplStr(wstr)
-@ stub EndDocPrinter
-@ stub EndPagePrinter
-@ stub EnumFormsW
-@ stub EnumJobsW
-@ stdcall EnumMonitorsW(wstr long ptr long ptr ptr)
-@ stub EnumPerMachineConnectionsW
-@ stdcall EnumPortsW(wstr long ptr long ptr ptr)
-@ stub EnumPrintProcessorDatatypesW
-@ stub EnumPrintProcessorsW
-@ stub EnumPrinterDataExW
-@ stub EnumPrinterDataW
-@ stub EnumPrinterDriversW
-@ stub EnumPrinterKeyW
-@ stub EnumPrintersW
-@ stub FindClosePrinterChangeNotification
-@ stub FlushPrinter
-@ stub FormatPrinterForRegistryKey
-@ stub FormatRegistryKeyForPrinter
-@ stub FreeOtherNames
-@ stub GetClientUserHandle
-@ stub GetFormW
-@ stub GetJobAttributes
-@ stub GetJobW
-@ stub GetNetworkId
-@ stub GetPrintProcessorDirectoryW
-@ stub GetPrinterDataExW
-@ stub GetPrinterDataW
-@ stdcall GetPrinterDriverDirectoryW(wstr wstr long ptr long ptr)
-@ stub GetPrinterDriverExW
-@ stub GetPrinterDriverW
-@ stub GetPrinterW
-@ stdcall ImpersonatePrinterClient(long)
-@ stdcall InitializeRouter()
-@ stdcall IsLocalCall()
-@ stub IsNamedPipeRpcCall
-@ stub LoadDriver
-@ stub LoadDriverFiletoConvertDevmode
-@ stub MIDL_user_allocate1
-@ stub MIDL_user_free1
-@ stub MarshallDownStructure
-@ stub MarshallUpStructure
-@ stub OldGetPrinterDriverW
-@ stub OpenPrinterExW
-@ stub OpenPrinterPortW
-@ stub OpenPrinterW
-@ stub PackStrings
-@ stub PartialReplyPrinterChangeNotification
-@ stub PlayGdiScriptOnPrinterIC
-@ stub PrinterHandleRundown
-@ stub PrinterMessageBoxW
-@ stub ProvidorFindClosePrinterChangeNotification
-@ stub ProvidorFindFirstPrinterChangeNotification
-@ stub ReadPrinter
-@ stub ReallocSplMem
-@ stub ReallocSplStr
-@ stub RemoteFindFirstPrinterChangeNotification
-@ stub ReplyClosePrinter
-@ stub ReplyOpenPrinter
-@ stub ReplyPrinterChangeNotification
-@ stub ResetPrinterW
-@ stdcall RevertToPrinterSelf()
-@ stub RouterAllocPrinterNotifyInfo
-@ stub RouterFindFirstPrinterChangeNotification
-@ stub RouterFindNextPrinterChangeNotification
-@ stub RouterFreePrinterNotifyInfo
-@ stub RouterRefreshPrinterChangeNotification
-@ stub RouterReplyPrinter
-@ stub ScheduleJob
-@ stub SeekPrinter
-@ stub SetAllocFailCount
-@ stub SetFormW
-@ stub SetJobW
-@ stub SetPortW
-@ stub SetPrinterDataExW
-@ stub SetPrinterDataW
-@ stub SetPrinterW
-@ stub SplCloseSpoolFileHandle
-@ stub SplCommitSpoolData
-@ stub SplDriverUnloadComplete
-@ stub SplGetSpoolFileInfo
-@ stdcall SplInitializeWinSpoolDrv(ptr)
-@ stdcall SplIsUpgrade()
-@ stub SplProcessPnPEvent
-@ stub SplReadPrinter
-@ stub SplRegisterForDeviceEvents
-@ stub SplStartPhase2Init
-@ stub SplUnregisterForDeviceEvents
-@ stub SpoolerFindClosePrinterChangeNotification
-@ stub SpoolerFindFirstPrinterChangeNotification
-@ stub SpoolerFindNextPrinterChangeNotification
-@ stub SpoolerFreePrinterNotifyInfo
-@ stdcall SpoolerHasInitialized()
-@ stdcall SpoolerInit()
-@ stub StartDocPrinterW
-@ stub StartPagePrinter
-@ stub UnloadDriver
-@ stub UnloadDriverFile
-@ stub UpdateBufferSize
-@ stub UpdatePrinterRegAll
-@ stub UpdatePrinterRegUser
-@ stub WaitForPrinterChange
-@ stdcall WaitForSpoolerInitialization()
-@ stub WritePrinter
-@ stub XcvDataW
-@ stub bGetDevModePerUser
-@ stub bSetDevModePerUser
-@ stub pszDbgAllocMsgA
-@ stub vDbgLogError
diff --git a/reactos/dll/win32/spoolss/spoolss_main.c b/reactos/dll/win32/spoolss/spoolss_main.c
deleted file mode 100644 (file)
index 79aa77d..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Implementation of the Spooler-Service helper DLL
- *
- * Copyright 2006 Detlef Riekenberg
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "spoolss.h"
-
-/* ################################ */
-
-static HMODULE hwinspool;
-
-static const WCHAR winspooldrvW[] = {'w','i','n','s','p','o','o','l','.','d','r','v',0};
-
-/******************************************************************************
- *
- */
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
-    TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
-
-    switch (fdwReason) {
-        case DLL_WINE_PREATTACH:
-            return FALSE;  /* prefer native version */
-        case DLL_PROCESS_ATTACH: {
-            DisableThreadLibraryCalls(hinstDLL);
-            break;
-
-        case DLL_PROCESS_DETACH:
-            if (lpvReserved) break;
-            backend_unload_all();
-            break;
-        }
-    }
-    return TRUE;
-}
-
-/******************************************************************
- *   AllocSplStr   [SPOOLSS.@]
- *
- * Create a copy from the String on the Spooler-Heap
- *
- * PARAMS
- *  pwstr [I] PTR to the String to copy
- *
- * RETURNS
- *  Failure: NULL
- *  Success: PTR to the copied String
- *
- */
-LPWSTR WINAPI AllocSplStr(LPCWSTR pwstr)
-{
-    LPWSTR  res = NULL;
-    DWORD   len;
-
-    TRACE("(%s)\n", debugstr_w(pwstr));
-    if (!pwstr) return NULL;
-
-    len = (lstrlenW(pwstr) + 1) * sizeof(WCHAR);
-    res = HeapAlloc(GetProcessHeap(), 0, len);
-    if (res) lstrcpyW(res, pwstr);
-        
-    TRACE("returning %p\n", res);
-    return res;
-}
-
-/******************************************************************
- *   BuildOtherNamesFromMachineName   [SPOOLSS.@]
- */
-BOOL WINAPI BuildOtherNamesFromMachineName(LPVOID * ptr1, LPVOID * ptr2)
-{
-    FIXME("(%p, %p) stub\n", ptr1, ptr2);
-
-    *ptr1 = NULL;
-    *ptr2 = NULL;
-    return FALSE;
-}
-
-/******************************************************************
- *   DllAllocSplMem   [SPOOLSS.@]
- *
- * Allocate cleared memory from the spooler heap
- *
- * PARAMS
- *  size [I] Number of bytes to allocate
- *
- * RETURNS
- *  Failure: NULL
- *  Success: PTR to the allocated memory
- *
- * NOTES
- *  We use the process heap (Windows use a separate spooler heap)
- *
- */
-LPVOID WINAPI DllAllocSplMem(DWORD size)
-{
-    LPVOID  res;
-
-    res = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
-    TRACE("(%d) => %p\n", size, res);
-    return res;
-}
-
-/******************************************************************
- *   DllFreeSplMem   [SPOOLSS.@]
- *
- * Free the allocated spooler memory
- *
- * PARAMS
- *  memory [I] PTR to the memory allocated by DllAllocSplMem
- *
- * RETURNS
- *  Failure: FALSE
- *  Success: TRUE
- *
- * NOTES
- *  We use the process heap (Windows use a separate spooler heap)
- *
- */
-
-BOOL WINAPI DllFreeSplMem(LPBYTE memory)
-{
-    TRACE("(%p)\n", memory);
-    return HeapFree(GetProcessHeap(), 0, memory);
-}
-
-/******************************************************************
- *   DllFreeSplStr   [SPOOLSS.@]
- *
- * Free the allocated Spooler-String
- *
- * PARAMS
- *  pwstr [I] PTR to the WSTR, allocated by AllocSplStr
- *
- * RETURNS
- *  Failure: FALSE
- *  Success: TRUE
- *
- */
-
-BOOL WINAPI DllFreeSplStr(LPWSTR pwstr)
-{
-    TRACE("(%s) PTR: %p\n", debugstr_w(pwstr), pwstr);
-    return HeapFree(GetProcessHeap(), 0, pwstr);
-}
-
-
-/******************************************************************
- *   ImpersonatePrinterClient   [SPOOLSS.@]
- */
-BOOL WINAPI ImpersonatePrinterClient(HANDLE hToken)
-{
-    FIXME("(%p) stub\n", hToken);
-    return TRUE;
-}
-
-/******************************************************************
- *   InitializeRouter   [SPOOLSS.@]
- */
-BOOL WINAPI InitializeRouter(void)
-{
-    TRACE("()\n");
-    return backend_load_all();
-}
-
-/******************************************************************
- *   IsLocalCall    [SPOOLSS.@]
- */
-BOOL WINAPI IsLocalCall(void)
-{
-    FIXME("() stub\n");
-    return TRUE;
-}
-
-/******************************************************************
- *   RevertToPrinterSelf   [SPOOLSS.@]
- */
-HANDLE WINAPI RevertToPrinterSelf(void)
-{
-    FIXME("() stub\n");
-    return (HANDLE) 0xdead0947;
-}
-
-/******************************************************************
- *   SplInitializeWinSpoolDrv   [SPOOLSS.@]
- *
- * Dynamic load "winspool.drv" and fill an array with some function-pointer
- *
- * PARAMS
- *  table  [I] array of function-pointer to fill
- *
- * RETURNS
- *  Success: TRUE
- *  Failure: FALSE
- *
- * NOTES
- *  Native "spoolss.dll" from w2k fill the table with 11 Function-Pointer.
- *  We implement the XP-Version (The table has only 9 Pointer)
- *
- */
-BOOL WINAPI SplInitializeWinSpoolDrv(LPVOID * table)
-{
-    DWORD res;
-
-    TRACE("(%p)\n", table);
-
-    hwinspool = LoadLibraryW(winspooldrvW);
-    if (!hwinspool) return FALSE;
-
-    table[0] = (void *) GetProcAddress(hwinspool, "OpenPrinterW");
-    table[1] = (void *) GetProcAddress(hwinspool, "ClosePrinter");
-    table[2] = (void *) GetProcAddress(hwinspool, "SpoolerDevQueryPrintW");
-    table[3] = (void *) GetProcAddress(hwinspool, "SpoolerPrinterEvent");
-    table[4] = (void *) GetProcAddress(hwinspool, "DocumentPropertiesW");
-    table[5] = (void *) GetProcAddress(hwinspool, (LPSTR) 212);  /* LoadPrinterDriver */
-    table[6] = (void *) GetProcAddress(hwinspool, (LPSTR) 213);  /* RefCntLoadDriver */
-    table[7] = (void *) GetProcAddress(hwinspool, (LPSTR) 214);  /* RefCntUnloadDriver */
-    table[8] = (void *) GetProcAddress(hwinspool, (LPSTR) 215);  /* ForceUnloadDriver */
-
-    for (res = 0; res < 9; res++) {
-        if (table[res] == NULL) return FALSE;
-    }
-
-    return TRUE;
-
-}
-
-/******************************************************************
- *   SplIsUpgrade   [SPOOLSS.@]
- */
-BOOL WINAPI SplIsUpgrade(void)
-{
-    FIXME("() stub\n");
-    return FALSE;
-}
-
-/******************************************************************
- *   SpoolerHasInitialized  [SPOOLSS.@]
- */
-BOOL WINAPI SpoolerHasInitialized(void)
-{
-    FIXME("() stub\n");
-    return TRUE;
-}
-
-/******************************************************************
- *   SpoolerInit   [SPOOLSS.@]
- */
-BOOL WINAPI SpoolerInit(void)
-{
-    FIXME("() stub\n");
-    return TRUE;
-}
-
-/******************************************************************
- *   WaitForSpoolerInitialization   [SPOOLSS.@]
- */
-BOOL WINAPI WaitForSpoolerInitialization(void)
-{
-    FIXME("() stub\n");
-    return TRUE;
-}
diff --git a/reactos/dll/win32/winspool/CMakeLists.txt b/reactos/dll/win32/winspool/CMakeLists.txt
deleted file mode 100644 (file)
index c63d8bb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-spec2def(winspool.drv winspool.spec ADD_IMPORTLIB)
-
-list(APPEND SOURCE
-    info.c
-    stubs.c
-    precomp.h)
-
-add_library(winspool.drv SHARED
-    ${SOURCE}
-    winspool.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/winspool_stubs.c
-    ${CMAKE_CURRENT_BINARY_DIR}/winspool.def)
-
-set_target_properties(winspool.drv PROPERTIES SUFFIX "")
-set_module_type(winspool.drv win32dll UNICODE)
-target_link_libraries(winspool.drv wine)
-add_importlibs(winspool.drv advapi32 shlwapi msvcrt kernel32 ntdll)
-add_pch(winspool.drv precomp.h SOURCE)
-add_cd_file(TARGET winspool.drv DESTINATION reactos/system32 FOR all)
diff --git a/reactos/dll/win32/winspool/info.c b/reactos/dll/win32/winspool/info.c
deleted file mode 100644 (file)
index c12f162..0000000
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * WINSPOOL functions
- *
- * Copyright 1996 John Harvey
- * Copyright 1998 Andreas Mohr
- * Copyright 1999 Klaas van Gend
- * Copyright 1999, 2000 Huw D M Davies
- * Copyright 2001 Marcus Meissner
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "precomp.h"
-
-#include <winreg.h>
-#include <winnls.h>
-#include <shlwapi.h>
-
-/******************************************************************************
- *             GetDefaultPrinterA   (WINSPOOL.@)
- */
-BOOL WINAPI GetDefaultPrinterA(LPSTR name, LPDWORD namesize)
-{
-   char *ptr;
-
-   if (*namesize < 1)
-   {
-      SetLastError (ERROR_INSUFFICIENT_BUFFER);
-      return FALSE;
-   }
-
-   if (!GetProfileStringA ("windows", "device", "", name, *namesize))
-   {
-      SetLastError (ERROR_FILE_NOT_FOUND);
-      return FALSE;
-   }
-
-   if ((ptr = strchr (name, ',')) == NULL)
-   {
-      SetLastError (ERROR_FILE_NOT_FOUND);
-      return FALSE;
-   }
-
-   *ptr = '\0';
-   *namesize = strlen (name) + 1;
-   return TRUE;
-}
-
-
-/******************************************************************************
- *             GetDefaultPrinterW   (WINSPOOL.@)
- */
-BOOL WINAPI GetDefaultPrinterW(LPWSTR name, LPDWORD namesize)
-{
-   char *buf;
-   BOOL  ret;
-
-   if (*namesize < 1)
-   {
-      SetLastError (ERROR_INSUFFICIENT_BUFFER);
-      return FALSE;
-   }
-
-   buf = HeapAlloc (GetProcessHeap (), 0, *namesize);
-   ret = GetDefaultPrinterA (buf, namesize);
-   if (ret)
-   {
-       DWORD len = MultiByteToWideChar (CP_ACP, 0, buf, -1, name, *namesize);
-       if (!len)
-       {
-           SetLastError (ERROR_INSUFFICIENT_BUFFER);
-           ret = FALSE;
-       }
-       else *namesize = len;
-   }
-
-   HeapFree (GetProcessHeap (), 0, buf);
-   return ret;
-}
-
-/******************************************************************************
- *             AddPrintProvidorA   (WINSPOOL.@)
- */
-BOOL
-WINAPI
-AddPrintProvidorA(LPSTR Name, DWORD Level, PBYTE Buffer)
-{
-   if (Name || Level > 2 || Buffer == NULL)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   if (Level == 1)
-   {
-      BOOL bRet;
-      PROVIDOR_INFO_1W Provider;
-      PROVIDOR_INFO_1A  *Prov = (PROVIDOR_INFO_1A*)Buffer;
-
-      if (Prov->pName == NULL || Prov->pDLLName == NULL || Prov->pEnvironment == NULL)
-      {
-         return FALSE;
-      }
-
-      Provider.pDLLName = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pDLLName)+1) * sizeof(WCHAR));
-      if (Provider.pDLLName)
-      {
-          MultiByteToWideChar(CP_ACP, 0, Prov->pDLLName, -1, Provider.pDLLName, strlen(Prov->pDLLName)+1);
-          Provider.pDLLName[strlen(Prov->pDLLName)] = L'\0';
-      }
-
-      Provider.pEnvironment = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pEnvironment)+1) * sizeof(WCHAR));
-      if (Provider.pEnvironment)
-      {
-          MultiByteToWideChar(CP_ACP, 0, Prov->pEnvironment, -1, Provider.pEnvironment, strlen(Prov->pEnvironment)+1);
-          Provider.pEnvironment[strlen(Prov->pEnvironment)] = L'\0';
-      }
-
-      Provider.pName = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pName)+1) * sizeof(WCHAR));
-      if (Provider.pName)
-      {
-          MultiByteToWideChar(CP_ACP, 0, Prov->pName, -1, Provider.pName, strlen(Prov->pName)+1);
-          Provider.pName[strlen(Prov->pName)] = L'\0';
-      }
-
-      bRet = AddPrintProvidorW(NULL, Level, (LPBYTE)&Provider);
-
-      if (Provider.pDLLName)
-          HeapFree(GetProcessHeap(), 0, Provider.pDLLName);
-
-      if (Provider.pEnvironment)
-          HeapFree(GetProcessHeap(), 0, Provider.pEnvironment);
-
-      if (Provider.pName)
-          HeapFree(GetProcessHeap(), 0, Provider.pName);
-
-      return bRet;
-   }
-   else
-   {
-      PROVIDOR_INFO_2W Provider;
-      PROVIDOR_INFO_2A  *Prov = (PROVIDOR_INFO_2A*)Buffer;
-
-      Provider.pOrder = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pOrder)+1) * sizeof(WCHAR));
-      if (Provider.pOrder)
-      {
-          BOOL bRet;
-          MultiByteToWideChar(CP_ACP, 0, Prov->pOrder, -1, Provider.pOrder, strlen(Prov->pOrder)+1);
-          Provider.pOrder[strlen(Prov->pOrder)] = L'\0';
-
-          bRet = AddPrintProvidorW(NULL, Level, (LPBYTE)&Provider);
-          HeapFree(GetProcessHeap(), 0, Provider.pOrder);
-          return bRet;
-      }
-   }
-
-  return FALSE;
-}
-
-
-/******************************************************************************
- *             AddPrintProvidorW   (WINSPOOL.@)
- */
-BOOL
-WINAPI
-AddPrintProvidorW(LPWSTR Name, DWORD Level, PBYTE Buffer)
-{
-   HKEY hKey;
-   LPWSTR pOrder;
-   DWORD dwSize, dwType;
-   BOOL bRet = FALSE;
-
-   if (Name || Level > 2 || Buffer == NULL)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-
-   if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Print\\Providers", 0, KEY_READ | KEY_WRITE, &hKey) != ERROR_SUCCESS)
-   {
-      return FALSE;
-   }
-
-   if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, NULL, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ)
-   {
-      RegCloseKey(hKey);
-      return FALSE;
-   }
-
-   pOrder = HeapAlloc(GetProcessHeap(), 0, dwSize);
-   if (!pOrder)
-   {
-      RegCloseKey(hKey);
-      return FALSE;
-   }
-
-   if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, (LPBYTE)pOrder, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ)
-   {
-      RegCloseKey(hKey);
-      return FALSE;
-   }
-
-   if (Level == 1)
-   {
-      LPWSTR pBuffer;
-      BOOL bFound = FALSE;
-      PROVIDOR_INFO_1W * Prov = (PROVIDOR_INFO_1W*)Buffer;
-
-      if (Prov->pName == NULL || Prov->pDLLName == NULL || Prov->pEnvironment == NULL)
-      {
-         SetLastError(ERROR_INVALID_PARAMETER);
-         RegCloseKey(hKey);
-         return FALSE;
-      }
-
-      pBuffer = pOrder;
-
-      while(pBuffer[0])
-      {
-         if (!wcsicmp(pBuffer, Prov->pName))
-         {
-            bFound = TRUE;
-            break;
-         }
-         pBuffer += wcslen(pBuffer) + 1;
-      }
-
-      if (!bFound)
-      {
-         HKEY hSubKey;
-         DWORD dwFullSize = dwSize + (wcslen(Prov->pName)+1) * sizeof(WCHAR);
-
-         if (RegCreateKeyExW(hKey, Prov->pName, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
-         {
-            RegSetValueExW(hSubKey, L"Name", 0, REG_SZ, (LPBYTE)Prov->pDLLName, (wcslen(Prov->pDLLName)+1) * sizeof(WCHAR));
-            RegCloseKey(hSubKey);
-         }
-
-         pBuffer = HeapAlloc(GetProcessHeap(), 0, dwFullSize);
-         if (pBuffer)
-         {
-             CopyMemory(pBuffer, pOrder, dwSize);
-             wcscpy(&pBuffer[(dwSize/sizeof(WCHAR))-1], Prov->pName);
-             pBuffer[(dwSize/sizeof(WCHAR)) + wcslen(Prov->pName)] = L'\0';
-             RegSetValueExW(hKey, L"Order", 0, REG_MULTI_SZ, (LPBYTE)pBuffer, dwFullSize);
-             HeapFree(GetProcessHeap(), 0, pBuffer);
-         }
-         bRet = TRUE;
-      }
-
-   }
-
-   RegCloseKey(hKey);
-   HeapFree(GetProcessHeap(), 0, pOrder);
-
-  return bRet;
-}
-
-/******************************************************************************
- *    DeletePrintProvidorA   (WINSPOOL.@)
- */
-BOOL
-WINAPI
-DeletePrintProvidorA(LPSTR Name, LPSTR Environment, LPSTR PrintProvidor)
-{
-   BOOL bRet;
-   LPWSTR Env, Prov;
-
-   if (Name || !Environment || !PrintProvidor)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   Env = HeapAlloc(GetProcessHeap(), 0, (strlen(Environment)+1) * sizeof(WCHAR));
-   if (!Env)
-   {
-      return FALSE;
-   }
-
-   MultiByteToWideChar(CP_ACP, 0, Environment, -1, Env, strlen(Environment)+1);
-   Env[strlen(Environment)] = L'\0';
-
-   Prov = HeapAlloc(GetProcessHeap(), 0, (strlen(PrintProvidor)+1) * sizeof(WCHAR));
-   if (!Prov)
-   {
-      HeapFree(GetProcessHeap(), 0, Env);
-      return FALSE;
-   }
-
-   MultiByteToWideChar(CP_ACP, 0, PrintProvidor, -1, Prov, strlen(PrintProvidor)+1);
-   Prov[strlen(PrintProvidor)] = L'\0';
-
-   bRet = DeletePrintProvidorW(NULL, Env, Prov);
-   HeapFree(GetProcessHeap(), 0, Env);
-   HeapFree(GetProcessHeap(), 0, Prov);
-
-  return bRet;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrintProvidorW(LPWSTR Name, LPWSTR Environment, LPWSTR PrintProvidor)
-{
-   HKEY hKey;
-   BOOL bFound;
-   DWORD dwType, dwSize, dwOffset, dwLength;
-   LPWSTR pOrder, pBuffer, pNew;
-
-   if (Name || !Environment || !PrintProvidor)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Print\\Providers", 0, KEY_READ | KEY_WRITE, &hKey) != ERROR_SUCCESS)
-   {
-      return FALSE;
-   }
-
-   if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, NULL, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ)
-   {
-      RegCloseKey(hKey);
-      return FALSE;
-   }
-
-   pOrder = HeapAlloc(GetProcessHeap(), 0, dwSize);
-   if (!pOrder)
-   {
-      RegCloseKey(hKey);
-      return FALSE;
-   }
-
-   if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, (LPBYTE)pOrder, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ)
-   {
-      RegCloseKey(hKey);
-      return FALSE;
-   }
-
-
-   pBuffer = pOrder;
-   bFound = FALSE;
-   while(pBuffer[0])
-   {
-       if (!wcsicmp(pBuffer, PrintProvidor))
-       {
-            bFound = TRUE;
-            break;
-         }
-         pBuffer += wcslen(pBuffer) + 1;
-   }
-
-   if (!bFound)
-   {
-      RegCloseKey(hKey);
-      HeapFree(GetProcessHeap(), 0, pOrder);
-      return FALSE;
-   }
-
-   pNew = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize);
-   if (!pNew)
-   {
-      RegCloseKey(hKey);
-      HeapFree(GetProcessHeap(), 0, pOrder);
-      return FALSE;
-   }
-
-   dwOffset = pBuffer - pOrder;
-   dwLength = (dwSize / sizeof(WCHAR)) - (dwOffset + wcslen(pBuffer) + 1);
-   CopyMemory(pNew, pOrder, dwOffset * sizeof(WCHAR));
-   CopyMemory(&pNew[dwOffset], pBuffer + wcslen(pBuffer) + 1, dwLength);
-
-   RegSetValueExW(hKey, L"Order", 0, REG_MULTI_SZ, (LPBYTE)pNew, (dwOffset + dwLength) * sizeof(WCHAR));
-   RegDeleteKey(hKey, PrintProvidor);
-
-   HeapFree(GetProcessHeap(), 0, pOrder);
-   HeapFree(GetProcessHeap(), 0, pNew);
-   RegCloseKey(hKey);
-
-   return TRUE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddMonitorA(LPSTR Name, DWORD Level, PBYTE Monitors)
-{
-   LPWSTR szName = NULL;
-   MONITOR_INFO_2W Monitor;
-   MONITOR_INFO_2A *pMonitor;
-   BOOL bRet = FALSE;
-
-   if (Level != 2 || !Monitors)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   pMonitor = (MONITOR_INFO_2A*)Monitors;
-   if (pMonitor->pDLLName == NULL || pMonitor->pName == NULL)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   ZeroMemory(&Monitor, sizeof(Monitor));
-
-   if (Name)
-   {
-      szName = HeapAlloc(GetProcessHeap(), 0, (strlen(Name) + 1) * sizeof(WCHAR));
-      if (!szName)
-      {
-         return FALSE;
-      }
-      MultiByteToWideChar(CP_ACP, 0, Name, -1, szName, strlen(Name)+1);
-      szName[strlen(Name)] = L'\0';
-   }
-
-   Monitor.pDLLName = HeapAlloc(GetProcessHeap(), 0, (strlen(pMonitor->pDLLName)+1) * sizeof(WCHAR));
-   if (!Monitor.pDLLName)
-   {
-      goto cleanup;
-   }
-   MultiByteToWideChar(CP_ACP, 0, pMonitor->pDLLName, -1, Monitor.pDLLName, strlen(pMonitor->pDLLName)+1);
-   pMonitor->pDLLName[strlen(pMonitor->pDLLName)] = L'\0';
-
-   Monitor.pName = HeapAlloc(GetProcessHeap(), 0, (strlen(pMonitor->pName)+1) * sizeof(WCHAR));
-   if (!Monitor.pName)
-   {
-      goto cleanup;
-   }
-   MultiByteToWideChar(CP_ACP, 0, pMonitor->pName, -1, Monitor.pName, strlen(pMonitor->pName)+1);
-   pMonitor->pName[strlen(pMonitor->pName)] = L'\0';
-
-
-   if (pMonitor->pEnvironment)
-   {
-      Monitor.pEnvironment = HeapAlloc(GetProcessHeap(), 0, (strlen(pMonitor->pEnvironment)+1) * sizeof(WCHAR));
-      if (!Monitor.pEnvironment)
-      {
-         goto cleanup;
-      }
-      MultiByteToWideChar(CP_ACP, 0, pMonitor->pEnvironment, -1, Monitor.pEnvironment, strlen(pMonitor->pEnvironment)+1);
-      pMonitor->pEnvironment[strlen(pMonitor->pEnvironment)] = L'\0';
-   }
-
-   bRet = AddMonitorW(szName, Level, (LPBYTE)&Monitor);
-
-cleanup:
-
-  if (szName)
-     HeapFree(GetProcessHeap(), 0, szName);
-
-  if (Monitor.pDLLName)
-     HeapFree(GetProcessHeap(), 0, Monitor.pDLLName);
-
-  if (Monitor.pEnvironment)
-     HeapFree(GetProcessHeap(), 0, Monitor.pEnvironment);
-
-  if (Monitor.pName)
-     HeapFree(GetProcessHeap(), 0, Monitor.pName);
-
-  return bRet;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddMonitorW(LPWSTR Name, DWORD Level, PBYTE Monitors)
-{
-   WCHAR szPath[MAX_PATH];
-   HMODULE hLibrary = NULL;
-   FARPROC InitProc;
-   HKEY hKey, hSubKey;
-   MONITOR_INFO_2W * pMonitor;
-
-
-   if (Level != 2 || !Monitors)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   pMonitor = (MONITOR_INFO_2W*)Monitors;
-
-   if (pMonitor->pDLLName == NULL || pMonitor->pName == NULL)
-   {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return FALSE;
-   }
-
-   if (wcschr(pMonitor->pDLLName, L'\\'))
-   {
-       hLibrary = LoadLibraryExW(pMonitor->pDLLName, NULL, 0);
-   }
-   else if (GetSystemDirectoryW(szPath, MAX_PATH) && PathAddBackslashW(szPath))
-   {
-      wcscat(szPath, pMonitor->pDLLName);
-      hLibrary = LoadLibraryExW(szPath, NULL, 0);
-   }
-
-   if (!hLibrary)
-   {
-      return FALSE;
-   }
-
-   InitProc = GetProcAddress(hLibrary, "InitializePrintMonitor");
-   if (!InitProc)
-   {
-      InitProc = GetProcAddress(hLibrary, "InitializePrintMonitor2");
-      if (!InitProc)
-      {
-         FreeLibrary(hLibrary);
-         SetLastError(ERROR_PROC_NOT_FOUND);
-         return FALSE;
-      }
-   }
-
-   // FIXME
-   // Initialize monitor
-   FreeLibrary(hLibrary);
-
-   if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors", 0, KEY_WRITE, &hKey) == ERROR_SUCCESS)
-   {
-      if (RegCreateKeyExW(hKey, pMonitor->pName, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
-      {
-         RegSetValueExW(hSubKey, L"Driver", 0, REG_SZ, (LPBYTE)pMonitor->pDLLName, (wcslen(pMonitor->pDLLName)+1)*sizeof(WCHAR));
-         RegCloseKey(hSubKey);
-      }
-      RegCloseKey(hKey);
-   }
-   return TRUE;
-}
-
diff --git a/reactos/dll/win32/winspool/precomp.h b/reactos/dll/win32/winspool/precomp.h
deleted file mode 100644 (file)
index ef6c1bd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _WINSPOOL_DRV_PCH_
-#define _WINSPOOL_DRV_PCH_
-
-#include <wine/config.h>
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winspool.h>
-
-#endif /* _WINSPOOL_DRV_PCH_ */
diff --git a/reactos/dll/win32/winspool/stubs.c b/reactos/dll/win32/winspool/stubs.c
deleted file mode 100644 (file)
index 435b555..0000000
+++ /dev/null
@@ -1,1773 +0,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS winspool DRV
- * FILE:        stubs.c
- * PURPOSE:     Stub functions
- * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
- * REVISIONS:
- */
-
-#include "precomp.h"
-
-#include <winuser.h>
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DllMain(HINSTANCE InstDLL,
-        DWORD Reason,
-        LPVOID Reserved)
-{
-  return TRUE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AbortPrinter(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool AbortPrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddFormA(HANDLE Printer, DWORD Level, PBYTE Form)
-{
-  OutputDebugStringW(L"winspool AddFormA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddFormW(HANDLE Printer, DWORD Level, PBYTE Form)
-{
-  OutputDebugStringW(L"winspool AddFormW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddJobA(HANDLE Printer, DWORD Level, PBYTE Data, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool AddJobA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddJobW(HANDLE Printer, DWORD Level, PBYTE Data, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool AddJobW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPortA(LPSTR Name, HWND Wnd, LPSTR MonitorName)
-{
-  OutputDebugStringW(L"winspool  stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPortW(LPWSTR Name, HWND Wnd, LPWSTR MonitorName)
-{
-  OutputDebugStringW(L"winspool AddPortW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-HANDLE
-WINAPI
-AddPrinterA(LPSTR Name, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool AddPrinterA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return NULL;
-}
-
-
-/*
- * @unimplemented
- */
-HANDLE
-WINAPI
-AddPrinterW(LPWSTR Name, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool AddPrinterW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return NULL;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrinterConnectionA(LPSTR Name)
-{
-  OutputDebugStringW(L"winspool AddPrinterConnectionA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrinterConnectionW(LPWSTR Name)
-{
-  OutputDebugStringW(L"winspool AddPrinterConnectionW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrinterDriverA(LPSTR Name, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool AddPrinterDriverA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrinterDriverW(LPWSTR Name, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool AddPrinterDriverW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrintProcessorA(LPSTR Name, LPSTR Environment, LPSTR PathName, LPSTR PrintProcessorName)
-{
-  OutputDebugStringW(L"winspool AddPrintProcessorA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrintProcessorW(LPWSTR Name, LPWSTR Environment, LPWSTR PathName, LPWSTR PrintProcessorName)
-{
-  OutputDebugStringW(L"winspool AddPrintProcessorW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-/*
- * @unimplemented
- */
-LONG
-WINAPI
-AdvancedDocumentPropertiesA(HWND Wnd, HANDLE Printer, LPSTR DeviceName, PDEVMODEA DevModeOut, PDEVMODEA DevModeIn)
-{
-  OutputDebugStringW(L"winspool AdvancedDocumentPropertiesA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-LONG
-WINAPI
-AdvancedDocumentPropertiesW(HWND Wnd, HANDLE Printer, LPWSTR DeviceName, PDEVMODEW DevModeOut, PDEVMODEW DevModeIn)
-{
-  OutputDebugStringW(L"winspool AdvancedDocumentPropertiesW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ClosePrinter(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool ClosePrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ConfigurePortA(LPSTR Name, HWND Wnd, LPSTR PortName)
-{
-  OutputDebugStringW(L"winspool ConfigurePortA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ConfigurePortW(LPWSTR Name, HWND Wnd, LPWSTR PortName)
-{
-  OutputDebugStringW(L"winspool ConfigurePortW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-HANDLE
-WINAPI
-ConnectToPrinterDlg(HWND Wnd, DWORD Flags)
-{
-  OutputDebugStringW(L"winspool ConnectToPrinterDlg stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return NULL;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeleteFormA(HANDLE Printer, LPSTR Name)
-{
-  OutputDebugStringW(L"winspool DeleteFormA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeleteFormW(HANDLE Printer, LPWSTR Name)
-{
-  OutputDebugStringW(L"winspool DeleteFormW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeleteMonitorA(LPSTR Name, LPSTR Environment, LPSTR MonitorName)
-{
-  OutputDebugStringW(L"winspool DeleteMonitorA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeleteMonitorW(LPWSTR Name, LPWSTR Environment, LPWSTR MonitorName)
-{
-  OutputDebugStringW(L"winspool DeleteMonitorW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePortA(LPSTR Name, HWND Wnd, LPSTR PortName)
-{
-  OutputDebugStringW(L"winspool DeletePortA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePortW(LPWSTR Name, HWND Wnd, LPWSTR PortName)
-{
-  OutputDebugStringW(L"winspool DeletePortW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinter(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool DeletePrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinterConnectionA(LPSTR Name)
-{
-  OutputDebugStringW(L"winspool DeletePrinterConnectionA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinterConnectionW(LPWSTR Name)
-{
-  OutputDebugStringW(L"winspool DeletePrinterConnectionW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-DeletePrinterDataA(HANDLE Printer, LPSTR Name)
-{
-  OutputDebugStringW(L"winspool DeletePrinterDataA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-DeletePrinterDataW(HANDLE Printer, LPWSTR Name)
-{
-  OutputDebugStringW(L"winspool DeletePrinterDataW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinterDriverA(LPSTR Name, LPSTR Environment, LPSTR Driver)
-{
-  OutputDebugStringW(L"winspool DeletePrinterDriverA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinterDriverW(LPWSTR Name, LPWSTR Environment, LPWSTR Driver)
-{
-  OutputDebugStringW(L"winspool DeletePrinterDriverW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrintProcessorA(LPSTR Name, LPSTR Environment, LPSTR PrintProcessor)
-{
-  OutputDebugStringW(L"winspool DeletePrintProcessorA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrintProcessorW(LPWSTR Name, LPWSTR Environment, LPWSTR PrintProcessor)
-{
-  OutputDebugStringW(L"winspool DeletePrintProcessorW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-DeviceCapabilitiesA(LPCSTR Device, LPCSTR Port, WORD Capability, LPSTR Buffer, CONST DEVMODEA *DevMode)
-{
-  OutputDebugStringW(L"winspool DeviceCapabilitiesA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return -1;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-DeviceCapabilitiesW(LPCWSTR Device, LPCWSTR Port, WORD Capability, LPWSTR Buffer, CONST DEVMODEW *DevMode)
-{
-  OutputDebugStringW(L"winspool DeviceCapabilitiesW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return -1;
-}
-
-
-/*
- * @unimplemented
- */
-LONG
-WINAPI
-DocumentPropertiesA(HWND Wnd, HANDLE Printer, LPSTR Device, PDEVMODEA DevModeOut, PDEVMODEA DevModeIn, DWORD Mode)
-{
-  OutputDebugStringW(L"winspool DocumentPropertiesA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return -1L;
-}
-
-
-/*
- * @unimplemented
- */
-LONG
-WINAPI
-DocumentPropertiesW(HWND Wnd, HANDLE Printer, LPWSTR Device, PDEVMODEW DevModeOut, PDEVMODEW DevModeIn, DWORD Mode)
-{
-  OutputDebugStringW(L"winspool DocumentPropertiesW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EndDocPrinter(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool EndDocPrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EndPagePrinter(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool EndPagePrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumFormsA(HANDLE Printer, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumFormsA stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumFormsW(HANDLE Printer, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumFormsW stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumJobsA(HANDLE Printer, DWORD First, DWORD NoJobs, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumJobsA stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumJobsW(HANDLE Printer, DWORD First, DWORD NoJobs, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumJobsW stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumMonitorsA(LPSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumMonitorsA stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumMonitorsW(LPWSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumMonitorsW stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPortsA(LPSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPortsA stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPortsW(LPWSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPortsW stub called\n");
-  *Needed = 0;
-  *Returned = 0;
-
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-EnumPrinterDataA(HANDLE Printer, DWORD Index, LPSTR Name, DWORD NameSize, PDWORD NameReturned, PDWORD Type, PBYTE Buffer, DWORD BufSize, PDWORD BufReturned)
-{
-  OutputDebugStringW(L"winspool EnumPrinterDataA stub called\n");
-
-  return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-EnumPrinterDataW(HANDLE Printer, DWORD Index, LPWSTR Name, DWORD NameSize, PDWORD NameReturned, PDWORD Type, PBYTE Buffer, DWORD BufSize, PDWORD BufReturned)
-{
-  OutputDebugStringW(L"winspool EnumPrinterDataW stub called\n");
-
-  return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrinterDriversA(LPSTR Name, LPSTR Environment, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrinterDriversA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrinterDriversW(LPWSTR Name, LPWSTR Environment, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrinterDriversW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-EnumPrinterKeyA(HANDLE Printer, LPSTR KeyName, LPTSTR Subkey, DWORD SubkeySize, PDWORD SubkeyReturned)
-{
-  OutputDebugStringW(L"winspool EnumPrinterKeyA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  *SubkeyReturned = 0;
-
-  return ERROR_FILE_NOT_FOUND;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-EnumPrinterKeyW(HANDLE Printer, LPWSTR KeyName, LPTSTR Subkey, DWORD SubkeySize, PDWORD SubkeyReturned)
-{
-  OutputDebugStringW(L"winspool EnumPrinterKeyW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  *SubkeyReturned = 0;
-
-  return ERROR_FILE_NOT_FOUND;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrintersA(DWORD Flags, LPSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrintersA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrintersW(DWORD Flags, LPWSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrintersW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrintProcessorDatatypesA(LPSTR Name, LPSTR PrintProcessor, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrintProcessorDatatypesA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrintProcessorDatatypesW(LPWSTR Name, LPWSTR PrintProcessor, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrintProcessorDatatypesW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrintProcessorsA(LPSTR Name, LPSTR Environment, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrintProcessorsA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-EnumPrintProcessorsW(LPWSTR Name, LPWSTR Environment, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed, PDWORD Returned)
-{
-  OutputDebugStringW(L"winspool EnumPrintProcessorsW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  *Needed = 0;
-  *Returned = 0;
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-FindClosePrinterChangeNotification(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool FindClosePrinterChangeNotification stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-HANDLE
-WINAPI
-FindFirstPrinterChangeNotification(HANDLE Printer, DWORD Flags, DWORD Options, PVOID NotifyOptions)
-{
-  OutputDebugStringW(L"winspool FindFirstPrinterChangeNotification stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return INVALID_HANDLE_VALUE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-FindNextPrinterChangeNotification(HANDLE Printer, PDWORD Change, LPVOID NotifyOptions, LPVOID* NotifyInfo)
-{
-  OutputDebugStringW(L"winspool FindNextPrinterChangeNotification stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-FreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO NotifyInfo)
-{
-  OutputDebugStringW(L"winspool FreePrinterNotifyInfo stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetFormA(HANDLE Printer, LPSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetFormA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetFormW(HANDLE Printer, LPWSTR Name, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetFormW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetJobA(HANDLE Printer, DWORD Job, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetJobA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetJobW(HANDLE Printer, DWORD Job, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetJobW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrinterA(HANDLE Printer, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrinterW(HANDLE Printer, DWORD Level, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-GetPrinterDataA(HANDLE Printer, LPSTR Name, PDWORD Type, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterDataA stub called\n");
-
-  return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-GetPrinterDataW(HANDLE Printer, LPWSTR Name, PDWORD Type, PBYTE Buffer, DWORD BufSize, PDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterDataW stub called\n");
-
-  return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrinterDriverA(HANDLE Printer, LPSTR Environment, DWORD Level, LPBYTE Buffer, DWORD BufSize, LPDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterDriverA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrinterDriverW(HANDLE Printer, LPWSTR Environment, DWORD Level, LPBYTE Buffer, DWORD BufSize, LPDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterDriverW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrinterDriverDirectoryA(LPSTR Name, LPSTR Environment, DWORD Level, LPBYTE Buffer, DWORD BufSize, LPDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterDriverDirectoryA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrinterDriverDirectoryW(LPWSTR Name, LPWSTR Environment, DWORD Level, LPBYTE Buffer, DWORD BufSize, LPDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrinterDriverDirectoryW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrintProcessorDirectoryA(LPSTR Name, LPSTR Environment, DWORD Level, LPBYTE Buffer, DWORD BufSize, LPDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrintProcessorDirectoryA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetPrintProcessorDirectoryW(LPWSTR Name, LPWSTR Environment, DWORD Level, LPBYTE Buffer, DWORD BufSize, LPDWORD Needed)
-{
-  OutputDebugStringW(L"winspool GetPrintProcessorDirectoryW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-OpenPrinterA(LPSTR Name, PHANDLE Printer, LPPRINTER_DEFAULTSA Defaults)
-{
-  OutputDebugStringW(L"winspool OpenPrinterA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-OpenPrinterW(LPWSTR Name, PHANDLE Printer, LPPRINTER_DEFAULTSW Defaults)
-{
-  OutputDebugStringW(L"winspool OpenPrinterW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-PrinterMessageBoxA(HANDLE Printer, DWORD Error, HWND Wnd, LPSTR Text, LPSTR Caption, DWORD Type)
-{
-  OutputDebugStringW(L"winspool PrinterMessageBoxA stub called\n");
-
-  return IDCANCEL;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-PrinterMessageBoxW(HANDLE Printer, DWORD Error, HWND Wnd, LPWSTR Text, LPWSTR Caption, DWORD Type)
-{
-  OutputDebugStringW(L"winspool PrinterMessageBoxW stub called\n");
-
-  return IDCANCEL;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-PrinterProperties(HWND Wnd, HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool PrinterProperties stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ReadPrinter(HANDLE Printer, PVOID Buffer, DWORD BufSize, PDWORD Received)
-{
-  OutputDebugStringW(L"winspool ReadPrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ResetPrinterA(HANDLE Printer, LPPRINTER_DEFAULTSA Defaults)
-{
-  OutputDebugStringW(L"winspool ResetPrinterA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ResetPrinterW(HANDLE Printer, LPPRINTER_DEFAULTSW Defaults)
-{
-  OutputDebugStringW(L"winspool ResetPrinterW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ScheduleJob(HANDLE Printer, DWORD Job)
-{
-  OutputDebugStringW(L"winspool ScheduleJob stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetFormA(HANDLE Printer, LPSTR Form, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool SetFormA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetFormW(HANDLE Printer, LPWSTR Form, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool SetFormW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetJobA(HANDLE Printer, DWORD Job, DWORD Level, PBYTE Buffer, DWORD Command)
-{
-  OutputDebugStringW(L"winspool SetJobA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetJobW(HANDLE Printer, DWORD Job, DWORD Level, PBYTE Buffer, DWORD Command)
-{
-  OutputDebugStringW(L"winspool SetJobW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetPrinterA(HANDLE Printer, DWORD Level, PBYTE Buffer, DWORD Command)
-{
-  OutputDebugStringW(L"winspool SetPrinterA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetPrinterW(HANDLE Printer, DWORD Level, PBYTE Buffer, DWORD Command)
-{
-  OutputDebugStringW(L"winspool SetPrinterW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetPrinterDataA(HANDLE Printer, LPSTR Name, DWORD Type, PBYTE Buffer, DWORD BufSize)
-{
-  OutputDebugStringW(L"winspool SetPrinterDataA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetPrinterDataW(HANDLE Printer, LPWSTR Name, DWORD Type, PBYTE Buffer, DWORD BufSize)
-{
-  OutputDebugStringW(L"winspool SetPrinterDataW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-StartDocPrinterA(HANDLE Printer, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool StartDocPrinterA stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-StartDocPrinterW(HANDLE Printer, DWORD Level, PBYTE Buffer)
-{
-  OutputDebugStringW(L"winspool StartDocPrinterW stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-StartPagePrinter(HANDLE Printer)
-{
-  OutputDebugStringW(L"winspool StartPagePrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-WaitForPrinterChange(HANDLE Printer, DWORD Flags)
-{
-  OutputDebugStringW(L"winspool WaitForPrinterChange stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-WritePrinter(HANDLE Printer, PVOID Buffer, DWORD BufSize, PDWORD Written)
-{
-  OutputDebugStringW(L"winspool WritePrinter stub called\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-
-  return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-XcvDataW(HANDLE hXcv,
-         LPCWSTR pszDataName,
-         PBYTE pInputData,
-         DWORD cbInputData,
-         PBYTE pOutputData,
-         DWORD cbOutputData,
-         PDWORD pcbOutputNeeded,
-         PDWORD pdwStatus)
-{
-    OutputDebugStringW(L"winspool XcvDataW stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetDefaultPrinterA(LPCSTR pszPrinter)
-{
-    OutputDebugStringW(L"winspool SetDefaultPrinterA stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetDefaultPrinterW(LPCWSTR pszPrinter)
-{
-    OutputDebugStringW(L"winspool SetDefaultPrinterW stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPortExA(LPSTR pName,
-           DWORD dwLevel,
-           LPBYTE pBuffer,
-           LPSTR pMonitorName)
-{
-    OutputDebugStringW(L"winspool AddPortExA stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPortExW(LPWSTR pName,
-           DWORD dwLevel,
-           LPBYTE pBuffer,
-           LPWSTR pMonitorName)
-{
-    OutputDebugStringW(L"winspool AddPortExW stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrinterDriverExA(LPSTR pName,
-                    DWORD dwLevel,
-                    LPBYTE pDriverInfo,
-                    DWORD dwFileCopyFlags)
-{
-    OutputDebugStringW(L"winspool AddPrinterDriverExA stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AddPrinterDriverExW(LPWSTR pName,
-                    DWORD dwLevel,
-                    LPBYTE pDriverInfo,
-                    DWORD dwFileCopyFlags)
-{
-    OutputDebugStringW(L"winspool AddPrinterDriverExW stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-DeletePrinterDataExA(HANDLE hPrinter,
-                     LPCSTR pKeyName,
-                     LPCSTR pValueName)
-{
-    OutputDebugStringW(L"winspool DeletePrinterDataExA stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-DeletePrinterDataExW(HANDLE hPrinter,
-                     LPCWSTR pKeyName,
-                     LPCWSTR pValueName)
-{
-    OutputDebugStringW(L"winspool DeletePrinterDataExW stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinterDriverExA(LPSTR pName,
-                       LPSTR pEnvironment,
-                       LPSTR pDriverName,
-                       DWORD dwDeleteFlag,
-                       DWORD dwVersionFlag)
-{
-    OutputDebugStringW(L"winspool DeletePrinterDriverExA stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-DeletePrinterDriverExW(LPWSTR pName,
-                       LPWSTR pEnvironment,
-                       LPWSTR pDriverName,
-                       DWORD dwDeleteFlag,
-                       DWORD dwVersionFlag)
-{
-    OutputDebugStringW(L"winspool DeletePrinterDriverExW stub called\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-EnumPrinterDataExA(HANDLE hPrinter,
-                   LPCSTR pKeyName,
-                   LPBYTE pEnumValues,
-                   DWORD cbEnumValues,
-                   LPDWORD pcbEnumValues,
-                   LPDWORD pnEnumValues)
-{
-    OutputDebugStringW(L"winspool EnumPrinterDataExA stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-EnumPrinterDataExW(HANDLE hPrinter,
-                   LPCWSTR pKeyName,
-                   LPBYTE pEnumValues,
-                   DWORD cbEnumValues,
-                   LPDWORD pcbEnumValues,
-                   LPDWORD pnEnumValues)
-{
-    OutputDebugStringW(L"winspool EnumPrinterDataExW stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-LONG
-WINAPI
-ExtDeviceMode(HWND hWnd,
-              HANDLE hInst,
-              LPDEVMODEA pDevModeOutput,
-              LPSTR pDeviceName,
-              LPSTR pPort,
-              LPDEVMODEA pDevModeInput,
-              LPSTR pProfile,
-              DWORD fMode)
-{
-    OutputDebugStringW(L"winspool ExtDeviceMode stub called\n");
-    return -1;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-GetPrinterDataExA(HANDLE hPrinter,
-                  LPCSTR pKeyName,
-                  LPCSTR pValueName,
-                  LPDWORD pType,
-                  LPBYTE pData,
-                  DWORD nSize,
-                  LPDWORD pcbNeeded)
-{
-    OutputDebugStringW(L"winspool GetPrinterDataExA stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-GetPrinterDataExW(HANDLE hPrinter,
-                  LPCWSTR pKeyName,
-                  LPCWSTR pValueName,
-                  LPDWORD pType,
-                  LPBYTE pData,
-                  DWORD nSize,
-                  LPDWORD pcbNeeded)
-{
-    OutputDebugStringW(L"winspool GetPrinterDataExW stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-SetPrinterDataExA(HANDLE hPrinter,
-                  LPCSTR pKeyName,
-                  LPCSTR pValueName,
-                  DWORD dwType,
-                  LPBYTE pData,
-                  DWORD cbData)
-{
-    OutputDebugStringW(L"winspool SetPrinterDataExA stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-SetPrinterDataExW(HANDLE hPrinter,
-                  LPCWSTR pKeyName,
-                  LPCWSTR pValueName,
-                  DWORD dwType,
-                  LPBYTE pData,
-                  DWORD cbData)
-{
-    OutputDebugStringW(L"winspool SetPrinterDataExW stub called\n");
-    return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SpoolerInit(VOID)
-{
-    OutputDebugStringW(L"winspool SpoolerInit stub called\n");
-    return FALSE;
-}
diff --git a/reactos/dll/win32/winspool/winspool.rc b/reactos/dll/win32/winspool/winspool.rc
deleted file mode 100644 (file)
index 139320b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define REACTOS_VERSION_DLL
-#define REACTOS_STR_FILE_DESCRIPTION  "Windows printer spooler"
-#define REACTOS_STR_INTERNAL_NAME     "winspool"
-#define REACTOS_STR_ORIGINAL_FILENAME "winspool.drv"
-#include <reactos/version.rc>
diff --git a/reactos/dll/win32/winspool/winspool.spec b/reactos/dll/win32/winspool/winspool.spec
deleted file mode 100644 (file)
index 8227e52..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-100 stub -noname EnumPrinterPropertySheets
-101 stub -noname ClusterSplOpen
-102 stub -noname ClusterSplClose
-103 stub -noname ClusterSplIsAlive
-104 stub PerfClose
-105 stub PerfCollect
-106 stub PerfOpen
-201 stdcall GetDefaultPrinterA(ptr ptr)
-202 stdcall SetDefaultPrinterA(str)
-203 stdcall GetDefaultPrinterW(ptr ptr)
-204 stdcall SetDefaultPrinterW(wstr)
-205 stub -noname SplReadPrinter
-206 stub -noname AddPerMachineConnectionA
-207 stub -noname AddPerMachineConnectionW
-208 stub -noname DeletePerMachineConnectionA
-209 stub -noname DeletePerMachineConnectionW
-210 stub -noname EnumPerMachineConnectionsA
-211 stub -noname EnumPerMachineConnectionsW
-212 stub -noname LoadPrinterDriver
-213 stub -noname RefCntLoadDriver
-214 stub -noname RefCntUnloadDriver
-215 stub -noname ForceUnloadDriver
-216 stub -noname PublishPrinterA
-217 stub -noname PublishPrinterW
-218 stub -noname CallCommonPropertySheetUI
-219 stub -noname PrintUIQueueCreate
-220 stub -noname PrintUIPrinterPropPages
-221 stub -noname PrintUIDocumentDefaults
-222 stub -noname SendRecvBidiData
-223 stub -noname RouterFreeBidiResponseContainer
-224 stub -noname ExternalConnectToLd64In32Server
-226 stub -noname PrintUIWebPnpEntry
-227 stub -noname PrintUIWebPnpPostEntry
-228 stub -noname PrintUICreateInstance
-229 stub -noname PrintUIDocumentPropertiesWrap
-230 stub -noname PrintUIPrinterSetup
-231 stub -noname PrintUIServerPropPages
-232 stub -noname AddDriverCatalog
-
-@ stub ADVANCEDSETUPDIALOG
-@ stdcall AbortPrinter(long)
-@ stdcall AddFormA(long long ptr)
-@ stdcall AddFormW(long long ptr)
-@ stdcall AddJobA(long long ptr long ptr)
-@ stdcall AddJobW(long long ptr long ptr)
-@ stdcall AddMonitorA(str long ptr)
-@ stdcall AddMonitorW(wstr long ptr)
-@ stdcall AddPortA(str ptr str)
-@ stdcall AddPortExA(str long ptr str)
-@ stdcall AddPortExW(wstr long ptr wstr)
-@ stdcall AddPortW(wstr long wstr)
-@ stdcall AddPrinterA(str long ptr)
-@ stdcall AddPrinterConnectionA(str)
-@ stdcall AddPrinterConnectionW(wstr)
-@ stdcall AddPrinterDriverA(str long ptr)
-@ stdcall AddPrinterDriverExA(str long ptr long)
-@ stdcall AddPrinterDriverExW(wstr long ptr long)
-@ stdcall AddPrinterDriverW(wstr long ptr)
-@ stdcall AddPrinterW(wstr long ptr)
-@ stdcall AddPrintProcessorA(str str str str)
-@ stdcall AddPrintProcessorW(wstr wstr wstr wstr)
-@ stdcall AddPrintProvidorA(str long ptr)
-@ stdcall AddPrintProvidorW(wstr long ptr)
-@ stdcall AdvancedDocumentPropertiesA(long long str ptr ptr)
-@ stdcall AdvancedDocumentPropertiesW(long long wstr ptr ptr)
-@ stub AdvancedSetupDialog
-@ stdcall ClosePrinter(long)
-@ stub CloseSpoolFileHandle
-@ stdcall ConfigurePortA(str long str)
-@ stdcall ConfigurePortW(wstr long wstr)
-@ stdcall ConnectToPrinterDlg(long long)
-@ stub ConvertAnsiDevModeToUnicodeDevMode
-@ stub ConvertUnicodeDevModeToAnsiDevMode
-@ stub CommitSpoolData
-@ stub CreatePrinterIC
-@ stub DEVICECAPABILITIES
-@ stub DEVICEMODE
-@ stdcall DeleteFormA(long str)
-@ stdcall DeleteFormW(long wstr)
-@ stdcall DeleteMonitorA(str str str)
-@ stdcall DeleteMonitorW(wstr wstr wstr)
-@ stdcall DeletePortA(str long str)
-@ stdcall DeletePortW(wstr long wstr)
-@ stdcall DeletePrinter(long)
-@ stdcall DeletePrinterConnectionA(str)
-@ stdcall DeletePrinterConnectionW(wstr)
-@ stdcall DeletePrinterDataExA(long str str)
-@ stdcall DeletePrinterDataExW(long wstr wstr)
-@ stdcall DeletePrinterDataA(ptr str)
-@ stdcall DeletePrinterDataW(ptr wstr)
-@ stdcall DeletePrinterDriverA(str str str)
-@ stdcall DeletePrinterDriverExA(str str str long long)
-@ stdcall DeletePrinterDriverExW(wstr wstr wstr long long)
-@ stdcall DeletePrinterDriverW(wstr wstr wstr)
-@ stub DeletePrinterIC
-@ stub DevQueryPrint
-@ stdcall DeletePrintProcessorA(str str str)
-@ stdcall DeletePrintProcessorW(wstr wstr wstr)
-@ stdcall DeletePrintProvidorA(str str str)
-@ stdcall DeletePrintProvidorW(wstr wstr wstr)
-@ stdcall DeviceCapabilitiesA(str str long ptr ptr)
-@ stdcall DeviceCapabilitiesW(wstr wstr long ptr ptr)
-@ stub DeviceMode
-@ stub DocumentEvent
-@ stdcall DllMain(ptr long ptr)
-@ stdcall DocumentPropertiesA(long long ptr ptr ptr long)
-@ stdcall DocumentPropertiesW(long long ptr ptr ptr long)
-@ stub EXTDEVICEMODE
-@ stdcall EndDocPrinter(long)
-@ stdcall EndPagePrinter(long)
-@ stdcall EnumFormsA(long long ptr long ptr ptr)
-@ stdcall EnumFormsW(long long ptr long ptr ptr)
-@ stdcall EnumJobsA(long long long long ptr long ptr ptr)
-@ stdcall EnumJobsW(long long long long ptr long ptr ptr)
-@ stdcall EnumMonitorsA(str long ptr long long long)
-@ stdcall EnumMonitorsW(wstr long ptr long long long)
-@ stdcall EnumPortsA(str long ptr ptr ptr ptr)
-@ stdcall EnumPortsW(wstr long ptr ptr ptr ptr)
-@ stdcall EnumPrinterDataA(long long ptr long ptr ptr ptr long ptr)
-@ stdcall EnumPrinterDataExA(long str ptr long ptr ptr)
-@ stdcall EnumPrinterDataExW(long wstr ptr long ptr ptr)
-@ stdcall EnumPrinterDataW(long long ptr long ptr ptr ptr long ptr)
-@ stdcall EnumPrinterDriversA(str str long ptr long ptr ptr)
-@ stdcall EnumPrinterDriversW(wstr wstr long ptr long ptr ptr)
-@ stdcall EnumPrintersA(long ptr long ptr long ptr ptr)
-@ stdcall EnumPrintersW(long ptr long ptr long ptr ptr)
-@ stdcall EnumPrinterKeyA(long str str long ptr)
-@ stdcall EnumPrinterKeyW(long wstr wstr long ptr)
-@ stdcall ExtDeviceMode(long long ptr str str ptr str long)
-@ stdcall EnumPrintProcessorDatatypesA(str str long ptr long ptr ptr)
-@ stdcall EnumPrintProcessorDatatypesW(wstr wstr long ptr long ptr ptr)
-@ stdcall EnumPrintProcessorsA(str str long ptr long ptr ptr)
-@ stdcall EnumPrintProcessorsW(wstr wstr long ptr long ptr ptr)
-@ stdcall FindClosePrinterChangeNotification(long)
-@ stdcall FindFirstPrinterChangeNotification(long long long ptr)
-@ stdcall FindNextPrinterChangeNotification(long ptr ptr ptr)
-@ stdcall FreePrinterNotifyInfo(ptr)
-@ stdcall GetFormA(long str long ptr long ptr)
-@ stdcall GetFormW(long wstr long ptr long ptr)
-@ stdcall GetJobA(long long long ptr long ptr)
-@ stdcall GetJobW(long long long ptr long ptr)
-@ stdcall GetPrinterA(long long ptr long ptr)
-@ stdcall GetPrinterDataA(long str ptr ptr long ptr)
-@ stdcall GetPrinterDataExA(long str str ptr ptr long ptr)
-@ stdcall GetPrinterDataExW(long wstr wstr ptr ptr long ptr)
-@ stdcall GetPrinterDataW(long wstr ptr ptr long ptr)
-@ stdcall GetPrinterDriverA(long str long ptr long ptr)
-@ stdcall GetPrinterDriverDirectoryA(str str long ptr long ptr)
-@ stdcall GetPrinterDriverDirectoryW(wstr wstr long ptr long ptr)
-@ stdcall GetPrinterDriverW(long str long ptr long ptr)
-@ stdcall GetPrinterW(long long ptr long ptr)
-@ stdcall GetPrintProcessorDirectoryA(str str long ptr long ptr)
-@ stdcall GetPrintProcessorDirectoryW(wstr wstr long ptr long ptr)
-@ stub GetSpoolFileHandle
-@ stub IsValidDevmodeA
-@ stub IsValidDevmodeW
-@ stdcall OpenPrinterA(str ptr ptr)
-@ stdcall OpenPrinterW(wstr ptr ptr)
-@ stub PlayGdiScriptOnPrinterIC
-@ stdcall PrinterMessageBoxA(ptr long ptr str str long)
-@ stdcall PrinterMessageBoxW(ptr long ptr wstr wstr long)
-@ stdcall PrinterProperties(long long)
-@ stub QueryColorProfile
-@ stub QuerySpoolMode
-@ stub QueryRemoteFonts
-@ stdcall ReadPrinter(long ptr long ptr)
-@ stdcall ResetPrinterA(long ptr)
-@ stdcall ResetPrinterW(long ptr)
-@ stdcall ScheduleJob(long long)
-@ stub SeekPrinter
-@ stub SetAllocFailCount
-@ stdcall SetFormA(long str long ptr)
-@ stdcall SetFormW(long wstr long ptr)
-@ stdcall SetJobA(long long long ptr long)
-@ stdcall SetJobW(long long long ptr long)
-@ stdcall SetPrinterA(long long ptr long)
-@ stdcall SetPrinterDataA(long str long ptr long)
-@ stdcall SetPrinterDataExA(long str str long ptr long)
-@ stdcall SetPrinterDataExW(long wstr wstr long ptr long)
-@ stdcall SetPrinterDataW(long wstr long ptr long)
-@ stdcall SetPrinterW(long long ptr long)
-@ stub SplDriverUnloadComplete
-@ stub SpoolerDevQueryPrintW
-@ stdcall SpoolerInit()
-@ stub SpoolerPrinterEvent
-@ stub StartDocDlgA
-@ stub StartDocDlgW
-@ stdcall StartDocPrinterA(long long ptr)
-@ stdcall StartDocPrinterW(long long ptr)
-@ stdcall StartPagePrinter(long)
-@ stdcall WaitForPrinterChange(ptr long)
-@ stdcall WritePrinter(long ptr long ptr)
-@ stdcall XcvDataW(long wstr ptr long ptr long ptr ptr)
index f933547..d354590 100644 (file)
@@ -16,6 +16,7 @@ if(USE_DIBLIB)
 endif()
 
 add_subdirectory(gdi/gdi32)
+add_subdirectory(printing)
 add_subdirectory(reactx)
 add_subdirectory(user/user32)
 add_subdirectory(user/winsrv)
diff --git a/reactos/win32ss/printing/CMakeLists.txt b/reactos/win32ss/printing/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7808286
--- /dev/null
@@ -0,0 +1,5 @@
+add_subdirectory(base)
+#add_subdirectory(drivers)
+add_subdirectory(monitors)
+#add_subdirectory(processors)
+#add_subdirectory(providers)
diff --git a/reactos/win32ss/printing/base/CMakeLists.txt b/reactos/win32ss/printing/base/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2956040
--- /dev/null
@@ -0,0 +1,4 @@
+#add_subdirectory(printui)
+#add_subdirectory(spoolss)
+add_subdirectory(spoolsv)
+#add_subdirectory(winspool)
diff --git a/reactos/win32ss/printing/base/printui/.gitignore b/reactos/win32ss/printing/base/printui/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/base/spoolss/.gitignore b/reactos/win32ss/printing/base/spoolss/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/base/winspool/.gitignore b/reactos/win32ss/printing/base/winspool/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/drivers/CMakeLists.txt b/reactos/win32ss/printing/drivers/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b8da0bb
--- /dev/null
@@ -0,0 +1,2 @@
+#add_subdirectory(tty)
+#add_subdirectory(unidrv)
diff --git a/reactos/win32ss/printing/drivers/tty/.gitignore b/reactos/win32ss/printing/drivers/tty/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/drivers/unidrv/res/.gitignore b/reactos/win32ss/printing/drivers/unidrv/res/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/drivers/unidrv/ui/.gitignore b/reactos/win32ss/printing/drivers/unidrv/ui/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/monitors/CMakeLists.txt b/reactos/win32ss/printing/monitors/CMakeLists.txt
new file mode 100644 (file)
index 0000000..cc255ca
--- /dev/null
@@ -0,0 +1,4 @@
+add_subdirectory(localmon)
+#add_subdirectory(pjlmon)
+#add_subdirectory(tcpmon)
+#add_subdirectory(usbmon)
diff --git a/reactos/win32ss/printing/monitors/localmon/CMakeLists.txt b/reactos/win32ss/printing/monitors/localmon/CMakeLists.txt
new file mode 100644 (file)
index 0000000..34ffc55
--- /dev/null
@@ -0,0 +1 @@
+add_subdirectory(ui)
diff --git a/reactos/win32ss/printing/monitors/pjlmon/.gitignore b/reactos/win32ss/printing/monitors/pjlmon/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/monitors/tcpmon/CMakeLists.txt b/reactos/win32ss/printing/monitors/tcpmon/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3051d97
--- /dev/null
@@ -0,0 +1 @@
+#add_subdirectory(ui)
diff --git a/reactos/win32ss/printing/monitors/tcpmon/ui/.gitignore b/reactos/win32ss/printing/monitors/tcpmon/ui/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/monitors/usbmon/.gitignore b/reactos/win32ss/printing/monitors/usbmon/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/processors/CMakeLists.txt b/reactos/win32ss/printing/processors/CMakeLists.txt
new file mode 100644 (file)
index 0000000..45454c4
--- /dev/null
@@ -0,0 +1 @@
+#add_subdirectory(winprint)
diff --git a/reactos/win32ss/printing/processors/winprint/.gitignore b/reactos/win32ss/printing/processors/winprint/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/providers/CMakeLists.txt b/reactos/win32ss/printing/providers/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b7aca41
--- /dev/null
@@ -0,0 +1,3 @@
+#add_subdirectory(inetpp)
+#add_subdirectory(localspl)
+#add_subdirectory(win32spl)
diff --git a/reactos/win32ss/printing/providers/inetpp/.gitignore b/reactos/win32ss/printing/providers/inetpp/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/providers/localspl/.gitignore b/reactos/win32ss/printing/providers/localspl/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/reactos/win32ss/printing/providers/win32spl/.gitignore b/reactos/win32ss/printing/providers/win32spl/.gitignore
new file mode 100644 (file)
index 0000000..e69de29