#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.
◆ __ROS_LONG64__
Definition at line 8 of file main.c.
◆ STANDALONE
◆ WIN32_NO_STATUS
◆ DllMain()
Definition at line 159 of file main.c.
160{
161 char szTestName[150];
165 int iOldStdout;
166
167
170
171
174 {
175 DPRINT(
"DLL: CreateFileW failed for the command pipe with error %lu!\n",
GetLastError());
177 }
178
179 if (!
ReadFile(hCommandPipe, szTestName,
sizeof(szTestName), &cbRead,
NULL))
180 {
181 DPRINT(
"DLL: ReadFile failed for the command pipe with error %lu!\n",
GetLastError());
183 }
184
186
187
188 if (!find_test(szTestName))
189 {
190 DPRINT(
"DLL: Got invalid test name \"%s\"!\n", szTestName);
192 }
193
194
198
199
201
202
205
206
208}
#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 45 of file main.c.
46{
47 static const WCHAR wszWindowsKey[] =
L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows";
49
56
57
60 {
61 skip(
"RegOpenKeyExW failed with status %u!\n", dwErrorCode);
63 }
64
65
68 {
69 skip(
"RegQueryValueExW failed with status %u!\n", dwErrorCode);
71 }
72
73
75 if (!pwszDevice)
76 {
77 skip(
"HeapAlloc failed!\n");
79 }
80
81
84 {
85 skip(
"RegQueryValueExW failed with status %u!\n", dwErrorCode);
87 }
88
89
90
91 pwszComma =
wcschr(pwszDevice,
L',');
92 if (!pwszComma)
93 {
94 skip(
"Found no or invalid default printer: %S!\n", pwszDevice);
96 }
97
98
99 *pwszComma = 0;
100 pwszReturnValue = pwszDevice;
101
103 if (hWindowsKey)
105
106 return pwszReturnValue;
107}
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 110 of file main.c.
111{
114
115
117 if (!hLocalspl)
118 {
121 }
122
123
125 if (!pfnInitializePrintProvidor)
126 {
129 }
130
131
133 {
136 }
137
139}
#define GetProcAddress(x, y)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
BOOL(WINAPI * PInitializePrintProvidor)(LPPRINTPROVIDOR, DWORD, LPWSTR)
Referenced by START_TEST().
◆ GetSpoolssFunc()
Definition at line 142 of file main.c.
143{
145
146
148 if (!hSpoolss)
149 {
152 }
153
155}
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 32 of file main.c.