67{
69 DWORD cchDefaultPrinter;
77
78
81
82
84 {
85 skip(
"Could not retrieve a handle to the local print server!\n");
86 return;
87 }
88
89
92
93
95 {
96
97 dwType = 0xDEADBEEF;
101 continue;
102
103 ok(dwType ==
p->dwType,
"dwType is %lu for \"%s\"!\n", dwType,
p->pszName);
104
105 if (
p->cbNeededA < 0xFFFFFFFF)
106 ok(cbNeeded ==
p->cbNeededA,
"cbNeeded is %lu for \"%s\", but expected %lu!\n", cbNeeded,
p->pszName,
p->cbNeededA);
107 else
108 ok(cbNeeded > 0,
"cbNeeded is 0 for \"%s\"!\n",
p->pszName);
109
112 ok(dwReturnCode ==
ERROR_SUCCESS,
"GetPrinterDataExA returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
113
114
115 dwType = 0xDEADBEEF;
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);
119
122 ok(dwReturnCode ==
ERROR_SUCCESS,
"GetPrinterDataExW returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
123
124
125 if (
strcmp(
p->pszName,
"OSVersion") == 0)
126 {
131 }
132 else if (
strcmp(
p->pszName,
"OSVersionEx") == 0)
133 {
138 }
139
140
142 {
144 ok(dwReturnCode ==
ERROR_SUCCESS,
"SetPrinterDataExW returns %lu for \"%s\"!\n", dwReturnCode,
p->pszName);
145 }
146
149 }
150
151
154
156
157
158 cchDefaultPrinter =
_countof(wszDefaultPrinter);
159 ok(
GetDefaultPrinterW(wszDefaultPrinter, &cchDefaultPrinter),
"GetDefaultPrinterW returns FALSE and requires %lu characters!\n", cchDefaultPrinter);
161 {
162 skip(
"Could not retrieve a handle to the default printer!\n");
163 return;
164 }
165
166
171
172
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");
177
180 ok(dwReturnCode ==
ERROR_SUCCESS,
"GetPrinterDataExW returns %lu!\n", dwReturnCode);
181
182
183 ok(
wcscmp((
PWSTR)pDataW, wszDefaultPrinter) == 0,
"pDataW is \"%S\", default printer is \"%S\"!\n", (
PWSTR)pDataW, wszDefaultPrinter);
184
185
188
190}
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 _OSVERSIONINFOEXW * POSVERSIONINFOEXW
struct _OSVERSIONINFOW * POSVERSIONINFOW
struct _OSVERSIONINFOEXA * POSVERSIONINFOEXA
struct _OSVERSIONINFOA * POSVERSIONINFOA