#include <apitest.h>
#include <io.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winreg.h>
#include <winspool.h>
#include <winsplp.h>
#include "../localspl_apitest.h"
#include <debug.h>
Go to the source code of this file.
◆ STANDALONE
Definition at line 8 of file main.c.
◆ WIN32_NO_STATUS
◆ DllMain()
Definition at line 157 of file main.c.
158{
159 char szTestName[150];
163 int iOldStdout;
164
165
168
169
172 {
173 DPRINT(
"DLL: CreateFileW failed for the command pipe with error %lu!\n",
GetLastError());
175 }
176
177 if (!
ReadFile(hCommandPipe, szTestName,
sizeof(szTestName), &cbRead,
NULL))
178 {
179 DPRINT(
"DLL: ReadFile failed for the command pipe with error %lu!\n",
GetLastError());
181 }
182
184
185
186 if (!find_test(szTestName))
187 {
188 DPRINT(
"DLL: Got invalid test name \"%s\"!\n", szTestName);
190 }
191
192
196
197
199
200
203
204
206}
static DWORD const fdwReason
#define DLL_PROCESS_ATTACH
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl _wfreopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode, _Inout_ FILE *_OldFile)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_CRTIMP void __cdecl setbuf(_Inout_ FILE *_File, _Inout_updates_opt_(BUFSIZ) _Post_readable_size_(0) char *_Buffer)
#define COMMAND_PIPE_NAME
_Check_return_ _CRTIMP int __cdecl _dup2(_In_ int _FileHandleSrc, _In_ int _FileHandleDst)
_Check_return_ _CRTIMP int __cdecl _dup(_In_ int _FileHandle)
DWORD WINAPI GetLastError(void)
◆ func_fpEnumPrinters()
◆ func_fpGetPrintProcessorDirectory()
| void func_fpGetPrintProcessorDirectory |
( |
void |
| ) |
|
◆ func_fpSetJob()
◆ GetDefaultPrinterFromRegistry()
We don't link against winspool, so we don't have GetDefaultPrinterW. We can easily implement a similar function ourselves though.
Definition at line 43 of file main.c.
44{
45 static const WCHAR wszWindowsKey[] =
L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows";
47
54
55
58 {
59 skip(
"RegOpenKeyExW failed with status %u!\n", dwErrorCode);
61 }
62
63
66 {
67 skip(
"RegQueryValueExW failed with status %u!\n", dwErrorCode);
69 }
70
71
73 if (!pwszDevice)
74 {
75 skip(
"HeapAlloc failed!\n");
77 }
78
79
82 {
83 skip(
"RegQueryValueExW failed with status %u!\n", dwErrorCode);
85 }
86
87
88
89 pwszComma =
wcschr(pwszDevice,
L',');
90 if (!pwszComma)
91 {
92 skip(
"Found no or invalid default printer: %S!\n", pwszDevice);
94 }
95
96
97 *pwszComma = 0;
98 pwszReturnValue = pwszDevice;
99
101 if (hWindowsKey)
103
104 return pwszReturnValue;
105}
static const WCHAR wszWindowsKey[]
static const WCHAR wszDeviceValue[]
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
static const WCHAR Cleanup[]
#define HKEY_CURRENT_USER
Referenced by START_TEST().
◆ GetLocalsplFuncs()
Definition at line 108 of file main.c.
109{
112
113
115 if (!hLocalspl)
116 {
119 }
120
121
123 if (!pfnInitializePrintProvidor)
124 {
127 }
128
129
131 {
134 }
135
137}
#define GetProcAddress(x, y)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
BOOL(WINAPI * PInitializePrintProvidor)(LPPRINTPROVIDOR, DWORD, LPWSTR)
Referenced by START_TEST().
◆ GetSpoolssFunc()
Definition at line 140 of file main.c.
141{
143
144
146 if (!hSpoolss)
147 {
150 }
151
153}
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Referenced by START_TEST().
◆ winetest_testlist
Initial value:=
{
{ 0, 0 }
}
void func_fpGetPrintProcessorDirectory(void)
void func_fpEnumPrinters(void)
Definition at line 30 of file main.c.