10#define WIN32_NO_STATUS
18#define MAX_PRINTER_NAME 220
31 {
"DefaultSpoolDirectory",
L"DefaultSpoolDirectory",
REG_SZ, 0xFFFFFFFF,
TRUE },
32 {
"PortThreadPriorityDefault",
L"PortThreadPriorityDefault",
REG_NONE, 4,
FALSE },
33 {
"PortThreadPriority",
L"PortThreadPriority",
REG_DWORD, 4,
TRUE },
34 {
"SchedulerThreadPriorityDefault",
L"SchedulerThreadPriorityDefault",
REG_NONE, 4,
FALSE },
35 {
"SchedulerThreadPriority",
L"SchedulerThreadPriority",
REG_DWORD, 4,
TRUE },
57 {
"RestartJobOnPoolError",
L"RestartJobOnPoolError",
REG_DWORD, 4,
TRUE },
58 {
"RestartJobOnPoolEnabled",
L"RestartJobOnPoolEnabled",
REG_DWORD, 4,
TRUE },
60 {
"DNSMachineName",
L"DNSMachineName",
REG_SZ, 0xFFFFFFFF,
FALSE },
62 {
"AllowUserManageForms",
L"AllowUserManageForms",
REG_DWORD, 4,
TRUE },
69 DWORD cchDefaultPrinter;
85 skip(
"Could not retrieve a handle to the local print server!\n");
103 ok(dwType ==
p->dwType,
"dwType is %lu for \"%s\"!\n", dwType,
p->pszName);
105 if (
p->cbNeededA < 0xFFFFFFFF)
106 ok(cbNeeded ==
p->cbNeededA,
"cbNeeded is %lu for \"%s\", but expected %lu!\n", cbNeeded,
p->pszName,
p->cbNeededA);
108 ok(cbNeeded > 0,
"cbNeeded is 0 for \"%s\"!\n",
p->pszName);
112 ok(dwReturnCode ==
ERROR_SUCCESS,
"GetPrinterDataExA returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
117 ok(dwReturnCode ==
ERROR_MORE_DATA,
"GetPrinterDataExW returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
118 ok(dwType ==
p->dwType,
"dwType is %lu for \"%s\"!\n", dwType,
p->pszName);
122 ok(dwReturnCode ==
ERROR_SUCCESS,
"GetPrinterDataExW returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
125 if (
strcmp(
p->pszName,
"OSVersion") == 0)
132 else if (
strcmp(
p->pszName,
"OSVersionEx") == 0)
144 ok(dwReturnCode ==
ERROR_SUCCESS,
"SetPrinterDataExW returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
158 cchDefaultPrinter =
_countof(wszDefaultPrinter);
159 ok(
GetDefaultPrinterW(wszDefaultPrinter, &cchDefaultPrinter),
"GetDefaultPrinterW returns FALSE and requires %lu characters!\n", cchDefaultPrinter);
162 skip(
"Could not retrieve a handle to the default printer!\n");
174 ok(dwReturnCode ==
ERROR_MORE_DATA,
"GetPrinterDataExW returns %lu!\n", dwReturnCode);
175 ok(dwType ==
REG_SZ,
"dwType is %lu!\n", dwType);
176 ok(cbNeeded > 0,
"cbNeeded is 0!\n");
180 ok(dwReturnCode ==
ERROR_SUCCESS,
"GetPrinterDataExW returns %lu!\n", dwReturnCode);
183 ok(
wcscmp((
PWSTR)pDataW, wszDefaultPrinter) == 0,
"pDataW is \"%S\", default printer is \"%S\"!\n", (
PWSTR)pDataW, wszDefaultPrinter);
struct _SPLREG_VALUE * PSPLREG_VALUE
struct _SPLREG_VALUE SPLREG_VALUE
SPLREG_VALUE SplRegValues[]
int strcmp(const char *String1, const char *String2)
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define ERROR_ACCESS_DENIED
#define ERROR_FILE_NOT_FOUND
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
ULONG dwOSVersionInfoSize
ULONG dwOSVersionInfoSize
ULONG dwOSVersionInfoSize
ULONG dwOSVersionInfoSize
#define RPC_X_NULL_REF_POINTER
DWORD WINAPI GetPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName, LPCSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded)
WINBOOL WINAPI GetDefaultPrinterW(LPWSTR pszBuffer, LPDWORD pcchBuffer)
DWORD WINAPI SetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, DWORD Type, LPBYTE pData, DWORD cbData)
WINBOOL WINAPI OpenPrinterW(LPWSTR pPrinterName, LPHANDLE phPrinter, LPPRINTER_DEFAULTSW pDefault)
WINBOOL WINAPI ClosePrinter(HANDLE hPrinter)
DWORD WINAPI GetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded)
struct _OSVERSIONINFOA OSVERSIONINFOA
struct _OSVERSIONINFOEXW * POSVERSIONINFOEXW
struct _OSVERSIONINFOEXA OSVERSIONINFOEXA
struct _OSVERSIONINFOW * POSVERSIONINFOW
struct _OSVERSIONINFOEXA * POSVERSIONINFOEXA
struct _OSVERSIONINFOA * POSVERSIONINFOA