ReactOS 0.4.16-dev-297-gc569aee
SplInitializeWinSpoolDrv.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Spooler Router API Tests
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Tests for SplInitializeWinSpoolDrv
5 * COPYRIGHT: Copyright 2015 Colin Finck (colin@reactos.org)
6 */
7
8#include <apitest.h>
9
10#define WIN32_NO_STATUS
11#include <windef.h>
12#include <winbase.h>
13#include <spoolss.h>
14
16{
17 HINSTANCE hWinspool;
18 PVOID Table[9];
19
20 hWinspool = LoadLibraryW(L"winspool.drv");
21 if (!hWinspool)
22 {
23 skip("Could not load winspool.drv, last error is %lu!\n", GetLastError());
24 return;
25 }
26
27 ok(SplInitializeWinSpoolDrv(Table), "SplInitializeWinSpoolDrv returns FALSE!\n");
28 ok(Table[0] == GetProcAddress(hWinspool, "OpenPrinterW"), "Table[0] is %p\n", Table[0]);
29 ok(Table[1] == GetProcAddress(hWinspool, "ClosePrinter"), "Table[1] is %p\n", Table[1]);
30 ok(Table[2] == GetProcAddress(hWinspool, "SpoolerDevQueryPrintW"), "Table[2] is %p\n", Table[2]);
31 ok(Table[3] == GetProcAddress(hWinspool, "SpoolerPrinterEvent"), "Table[3] is %p\n", Table[3]);
32 ok(Table[4] == GetProcAddress(hWinspool, "DocumentPropertiesW"), "Table[4] is %p\n", Table[4]);
33 ok(Table[5] == GetProcAddress(hWinspool, (LPSTR)212), "Table[5] is %p\n", Table[5]);
34 ok(Table[6] == GetProcAddress(hWinspool, (LPSTR)213), "Table[6] is %p\n", Table[6]);
35 ok(Table[7] == GetProcAddress(hWinspool, (LPSTR)214), "Table[7] is %p\n", Table[7]);
36 ok(Table[8] == GetProcAddress(hWinspool, (LPSTR)215), "Table[8] is %p\n", Table[8]);
37}
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define GetProcAddress(x, y)
Definition: compat.h:753
#define LoadLibraryW(x)
Definition: compat.h:747
ASMGENDATA Table[]
Definition: genincdata.c:61
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI SplInitializeWinSpoolDrv(PVOID *pTable)
Definition: main.c:205
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
char * LPSTR
Definition: xmlstorage.h:182