ReactOS 0.4.15-dev-8116-gf69e256
StartDocPrinter.c File Reference
#include <apitest.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winspool.h>
Include dependency graph for StartDocPrinter.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 

Functions

 START_TEST (StartDocPrinter)
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 10 of file StartDocPrinter.c.

Function Documentation

◆ START_TEST()

START_TEST ( StartDocPrinter  )

ERROR_INVALID_LEVEL with correct handle but invalid Level

Definition at line 16 of file StartDocPrinter.c.

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}
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define SetLastError(x)
Definition: compat.h:752
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned char * LPBYTE
Definition: typedefs.h:53
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
DWORD WINAPI StartDocPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo)