mirror of
https://github.com/reactos/reactos.git
synced 2024-10-30 19:41:57 +00:00
99b62ed313
Make the tests actually succeed under Windows Server 2003. svn path=/branches/colins-printing-for-freedom/; revision=67884
31 lines
979 B
C
31 lines
979 B
C
/*
|
|
* PROJECT: ReactOS Print Spooler DLL API Tests
|
|
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
|
|
* PURPOSE: Tests for OpenPrinterA/OpenPrinterW
|
|
* COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
|
|
*/
|
|
|
|
#include <apitest.h>
|
|
|
|
#define WIN32_NO_STATUS
|
|
#include <windef.h>
|
|
#include <winbase.h>
|
|
#include <wingdi.h>
|
|
#include <winspool.h>
|
|
|
|
START_TEST(OpenPrinter)
|
|
{
|
|
HANDLE hPrinter;
|
|
|
|
// Give no handle at all, this has to fail
|
|
SetLastError(0xDEADBEEF);
|
|
ok(!OpenPrinterW(NULL, NULL, NULL), "OpenPrinterW returns TRUE!\n");
|
|
ok(GetLastError() == ERROR_INVALID_PARAMETER, "OpenPrinterW returns error %lu!\n", GetLastError());
|
|
|
|
// Open a handle to the local print server
|
|
SetLastError(0xDEADBEEF);
|
|
ok(OpenPrinterW(NULL, &hPrinter, NULL), "OpenPrinterW returns FALSE!\n");
|
|
ok(GetLastError() == ERROR_SUCCESS, "OpenPrinterW returns error %lu!\n", GetLastError());
|
|
ClosePrinter(hPrinter);
|
|
}
|