2 * Unit test suite for the Local Printmonitor User Interface
4 * Copyright 2007 Detlef Riekenberg
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "ddk/winsplp.h"
33 #include "wine/test.h"
39 static PMONITORUI (WINAPI *pInitializePrintMonitorUI)(VOID);
40 static PMONITORUI pui;
41 static BOOL (WINAPI *pAddPortUI)(PCWSTR, HWND, PCWSTR, PWSTR *);
42 static BOOL (WINAPI *pConfigurePortUI)(PCWSTR, HWND, PCWSTR);
43 static BOOL (WINAPI *pDeletePortUI)(PCWSTR, HWND, PCWSTR);
45 /* ########################### */
47 static LPCSTR load_functions(void)
52 hdll = LoadLibraryA(ptr);
53 if (!hdll) return ptr;
55 ptr = "InitializePrintMonitorUI";
56 pInitializePrintMonitorUI = (VOID *) GetProcAddress(hdll, ptr);
57 if (!pInitializePrintMonitorUI) return ptr;
63 /* ########################### */
71 /* localui.dll does not exist before w2k */
72 ptr = load_functions();
74 skip("%s not found\n", ptr);
78 pui = pInitializePrintMonitorUI();
80 numentries = (pui->dwMonitorUISize - sizeof(DWORD)) / sizeof(VOID *);
82 "dwMonitorUISize (%d) => %d Functions\n", pui->dwMonitorUISize, numentries);
85 pAddPortUI = pui->pfnAddPortUI;
86 pConfigurePortUI = pui->pfnConfigurePortUI;
87 pDeletePortUI = pui->pfnDeletePortUI;