ReactOS
0.4.16-dev-197-g92996da
StartDocPrinter.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS Print Spooler DLL API Tests
3
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4
* PURPOSE: Tests for StartDocPrinterA/StartDocPrinterW
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 <
wingdi.h
>
14
#include <
winspool.h
>
15
16
START_TEST
(
StartDocPrinter
)
17
{
18
DWORD
dwResult;
19
DOCINFOW
docInfo = { 0 };
20
21
SetLastError
(0xDEADBEEF);
22
dwResult =
StartDocPrinterW
(
NULL
, 0,
NULL
);
23
ok
(dwResult == 0,
"StartDocPrinterW returns %lu!\n"
, dwResult);
24
ok
(
GetLastError
() ==
ERROR_INVALID_HANDLE
,
"StartDocPrinter returns error %lu!\n"
,
GetLastError
());
25
26
SetLastError
(0xDEADBEEF);
27
dwResult =
StartDocPrinterW
(
NULL
, 1,
NULL
);
28
ok
(dwResult == 0,
"StartDocPrinterW returns %lu!\n"
, dwResult);
29
ok
(
GetLastError
() ==
ERROR_INVALID_HANDLE
,
"StartDocPrinter returns error %lu!\n"
,
GetLastError
());
30
31
SetLastError
(0xDEADBEEF);
32
dwResult =
StartDocPrinterW
(
NULL
, 0, (
LPBYTE
)&docInfo);
33
ok
(dwResult == 0,
"StartDocPrinterW returns %lu!\n"
, dwResult);
34
ok
(
GetLastError
() ==
ERROR_INVALID_HANDLE
,
"StartDocPrinter returns error %lu!\n"
,
GetLastError
());
35
36
SetLastError
(0xDEADBEEF);
37
dwResult =
StartDocPrinterW
(
NULL
, 1, (
LPBYTE
)&docInfo);
38
ok
(dwResult == 0,
"StartDocPrinterW returns %lu!\n"
, dwResult);
39
ok
(
GetLastError
() ==
ERROR_INVALID_HANDLE
,
"StartDocPrinter returns error %lu!\n"
,
GetLastError
());
40
42
}
apitest.h
ok
#define ok(value,...)
Definition:
atltest.h:57
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
NULL
#define NULL
Definition:
types.h:112
SetLastError
#define SetLastError(x)
Definition:
compat.h:752
ERROR_INVALID_HANDLE
#define ERROR_INVALID_HANDLE
Definition:
compat.h:98
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
_DOCINFOW
Definition:
wingdi.h:1682
LPBYTE
unsigned char * LPBYTE
Definition:
typedefs.h:53
winbase.h
GetLastError
DWORD WINAPI GetLastError(void)
Definition:
except.c:1042
windef.h
wingdi.h
winspool.h
StartDocPrinter
#define StartDocPrinter
Definition:
winspool.h:941
StartDocPrinterW
DWORD WINAPI StartDocPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo)
modules
rostests
apitests
winspool
StartDocPrinter.c
Generated on Wed Oct 30 2024 06:07:55 for ReactOS by
1.9.6