22 static const WCHAR configuration_fileW[] = {
'C',
'o',
'n',
'f',
'i',
'g',
'u',
'r',
'a',
't',
'i',
'o',
'n',
' ',
'F',
'i',
'l',
'e',0};
25 static const WCHAR dependent_filesW[] = {
'D',
'e',
'p',
'e',
'n',
'd',
'e',
'n',
't',
' ',
'F',
'i',
'l',
'e',
's',0};
29 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
30 'c',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
31 'P',
'r',
'i',
'n',
't',
'\\',
32 'E',
'n',
'v',
'i',
'r',
'o',
'n',
'm',
'e',
'n',
't',
's',
'\\',
33 '%',
's',
'\\',
'D',
'r',
'i',
'v',
'e',
'r',
's',
'%',
's',0 };
35 static const WCHAR previous_namesW[] = {
'P',
'r',
'e',
'v',
'i',
'o',
'u',
's',
' ',
'N',
'a',
'm',
'e',
's',0};
40 static const WCHAR driversW[] = {
'\\',
'd',
'r',
'i',
'v',
'e',
'r',
's',
'\\',0};
41 static const WCHAR ia64_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'I',
'A',
'6',
'4',0};
43 static const WCHAR version3_regpathW[] = {
'\\',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'-',
'3',0};
45 static const WCHAR version0_regpathW[] = {
'\\',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'-',
'0',0};
48 static const WCHAR x64_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'x',
'6',
'4',0};
50 static const WCHAR x86_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
' ',
'x',
'8',
'6',0};
52 static const WCHAR win40_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'4',
'.',
'0',0};
87 ERR(
"GetSystemDirectoryW failed\n");
99 ERR(
"LocalGetPrinterDriverDirectory failed\n");
271 (*ppDriverInfo)->cVersion = 3;
289 pwszStrings[5] =
L"";
290 pwszStrings[6] =
L"localspl.dll|printui.dll|";
291 pwszStrings[7] =
NULL;
314 (*ppDriverInfo)->cVersion = 3;
318 ToMultiSz((*ppDriverInfo)->pDependentFiles);
333 pwszStrings[5] =
L"";
334 pwszStrings[6] =
L"localspl.dll|printui.dll|";
335 pwszStrings[7] =
NULL;
341 pwszStrings[9] =
NULL;
358 (*ppDriverInfo)->cVersion = 3;
362 ToMultiSz((*ppDriverInfo)->pDependentFiles);
393 (*ppDriverInfo)->cVersion = 3;
395 (*ppDriverInfo)->dwDriverAttributes = 0;
397 (*ppDriverInfo)->dwConfigVersion = 1;
399 (*ppDriverInfo)->dwDriverVersion = 1;
420 pwszStrings[5] =
L"";
421 pwszStrings[6] =
L"localspl.dll|printui.dll|";
422 pwszStrings[7] =
NULL;
428 pwszStrings[9] =
NULL;
429 pwszStrings[10] =
NULL;
430 pwszStrings[11] =
NULL;
431 pwszStrings[12] =
NULL;
449 (*ppDriverInfo)->cVersion = 3;
453 ToMultiSz((*ppDriverInfo)->pDependentFiles);
470 pwszStrings[5] =
L"";
471 pwszStrings[6] =
L"localspl.dll|printui.dll|";
472 pwszStrings[7] =
NULL;
478 pwszStrings[9] =
NULL;
479 pwszStrings[10] =
NULL;
480 pwszStrings[11] =
NULL;
481 pwszStrings[12] =
NULL;
483 pwszStrings[14] =
NULL;
488 pwszStrings[15] =
NULL;
489 pwszStrings[16] =
NULL;
490 pwszStrings[17] =
NULL;
491 pwszStrings[18] =
NULL;
508 (*ppDriverInfo)->cVersion = 3;
512 ToMultiSz((*ppDriverInfo)->pDependentFiles);
533 PBYTE pEnd = &pDriverInfo[cbBuf];
537 TRACE(
"LocalGetPrinterDriver(%p, %lu, %lu, %p, %lu, %p)\n", hPrinter, pEnvironment,
Level, pDriverInfo, cbBuf,
pcbNeeded);
541 if (pHandle->
HandleType != HandleType_Printer)
550 if (Level < 1 || Level == 7 || Level > 8)
565 ERR(
"Insuffisient Buffer size\n");
589 DWORD dwClientMajorVersion,
590 DWORD dwClientMinorVersion,
591 PDWORD pdwServerMajorVersion,
592 PDWORD pdwServerMinorVersion )
594 FIXME(
"LocalGetPrinterDriverEx(%p, %lu, %lu, %p, %lu, %p, %lu, %lu, %p, %p)\n", hPrinter, pEnvironment,
Level, pDriverInfo, cbBuf,
pcbNeeded, dwClientMajorVersion, dwClientMinorVersion, pdwServerMajorVersion, pdwServerMinorVersion);
607 FIXME(
"LocalEnumPrinterDrivers(%S, %S, %lu, %p, %lu, %p, %p)\n",
pName, pEnvironment,
Level, pDriverInfo, cbBuf,
pcbNeeded, pcReturned);
610 if (Level < 1 || Level == 7 || Level > 8)
784 FIXME(
"LocalGetPrinterDriverDirectory(%S, %S, %lu, %p, %lu, %p)\n",
pName, pEnvironment,
Level, pDriverDirectory, cbBuf,
pcbNeeded);
802 needed *=
sizeof(
WCHAR);
985 ERR(
"Can't create Drivers key\n");
1080 if (hui && pDrvDriverEvent)
1086 TRACE(
"got %d from DRIVER_EVENT_INITIALIZE\n",
res);
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
HKEY open_driver_reg(LPCWSTR pEnvironment)
#define ERROR_INVALID_PARAMETER
static void _LocalGetPrinterDriverLevel4(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_4W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
static const WCHAR versionW[]
static const WCHAR data_fileW[]
PCWSTR wszPrintProviderInfo[3]
static const PLocalPrinterDriverLevelFunc pfnPrinterDriverLevels[]
BOOL WINAPI LocalAddPrinterDriver(LPWSTR pName, DWORD level, LPBYTE pDriverInfo)
static void _LocalGetPrinterDriverLevel5(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_5W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static BOOL apd_copyfile(WCHAR *pathname, WCHAR *file_part, apd_data_t *apd)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
static WCHAR wszPrintUiFile[MAX_PATH]
static const WCHAR datatypeW[]
static DWORD dwDriverInfo3Offsets[]
static const WCHAR fmt_driversW[]
#define ERROR_BUFFER_OVERFLOW
static DWORD dwDriverInfo8Offsets[]
struct _DRIVER_INFO_3W DRIVER_INFO_3W
#define DRIVER_EVENT_INITIALIZE
void(* PLocalPrinterDriverLevelFunc)(PLOCAL_PRINTER, PVOID, PBYTE *, PDWORD)
#define ERROR_INVALID_HANDLE
static DWORD dwDriverInfo2Offsets[]
static void _LocalGetPrinterDriverLevel1(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_1W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
PLOCAL_PRINT_MONITOR pPrintMonitor
BOOL WINAPI LocalGetPrinterDriverDirectory(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pDriverDirectory, DWORD cbBuf, PDWORD pcbNeeded)
static const WCHAR previous_namesW[]
DWORD WINAPI GetLastError(VOID)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
static const WCHAR configuration_fileW[]
static WCHAR wszDriverPath[MAX_PATH]
static const WCHAR backslashW[]
static const WCHAR ia64_subdirW[]
static void _LocalGetPrinterDriverLevel2(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_2W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
#define APD_COPY_FROM_DIRECTORY
static DWORD dwDriverInfo4Offsets[]
static PRINTENV_T env_x86
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI GetVersion(VOID)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
static void _LocalGetPrinterDriverLevel8(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_8W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
#define ERROR_INVALID_USER_BUFFER
static PRINTENV_T env_x64
static const WCHAR emptyW[]
static const WCHAR x86_subdirW[]
const WCHAR wszCurrentEnvironment[]
#define APD_COPY_ALL_FILES
struct _LOCAL_HANDLE * PLOCAL_HANDLE
#define ERROR_ACCESS_DENIED
static const WCHAR driverW[]
static const DWORD di_sizeof[]
static DWORD dwDriverInfo1Offsets[]
#define APD_COPY_NEW_FILES
static const WCHAR ia64_envnameW[]
struct _DRIVER_INFO_6W DRIVER_INFO_6W
PLOCAL_PRINT_PROCESSOR pPrintProcessor
static const WCHAR win40_subdirW[]
BOOL WINAPI LocalGetPrinterDriver(HANDLE hPrinter, LPWSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf, LPDWORD pcbNeeded)
static WCHAR wszScratchPad[MAX_PATH]
WCHAR dst[MAX_PATH+MAX_PATH]
static PPRINTENV_T all_printenv[]
#define REG_OPTION_NON_VOLATILE
static const WCHAR x64_envnameW[]
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static void ToMultiSz(LPWSTR pString)
BOOL WINAPI LocalAddPrinterDriverEx(LPWSTR pName, DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags)
static PRINTENV_T env_win40
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
static const WCHAR version3_subdirW[]
static const WCHAR help_fileW[]
struct _DRIVER_INFO_1W DRIVER_INFO_1W
static const WCHAR spoolW[]
struct _SKIPLIST_NODE * Next[SKIPLIST_LEVELS]
static int multi_sz_lenW(const WCHAR *str)
struct _DRIVER_INFO_2W DRIVER_INFO_2W
PPRINTENV_T validate_envW(LPCWSTR env)
BOOL WINAPI LocalGetPrinterDriverEx(HANDLE hPrinter, LPWSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf, LPDWORD pcbNeeded, DWORD dwClientMajorVersion, DWORD dwClientMinorVersion, PDWORD pdwServerMajorVersion, PDWORD pdwServerMinorVersion)
static const WCHAR version0_regpathW[]
static HMODULE driver_load(const PRINTENV_T *env, LPWSTR dllname)
PWSTR pwszDefaultDatatype
static const WCHAR version0_subdirW[]
static void _LocalGetPrinterDriverLevel6(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_6W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static WCHAR wszLocalSplFile[MAX_PATH]
static PRINTENV_T env_ia64
#define memcpy(s1, s2, n)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
WCHAR src[MAX_PATH+MAX_PATH]
static const WCHAR Cleanup[]
struct _LOCAL_PRINTER * PLOCAL_PRINTER
static const WCHAR driversW[]
struct _DRIVER_INFO_4W DRIVER_INFO_4W
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_In_ DWORD _Out_ PDWORD pcbNeeded
BOOL myAddPrinterDriverEx(DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags, BOOL lazy)
static DWORD dwDriverInfo6Offsets[]
#define FIELD_OFFSET(t, f)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL WINAPI LocalEnumPrinterDrivers(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pDriverInfo, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
static LPCWSTR LPCWSTR LPCWSTR env
static DWORD dwDriverInfo5Offsets[]
static const WCHAR monitorW[]
static WCHAR * get_file_part(WCHAR *name)
LONG copy_servername_from_name(LPCWSTR name, LPWSTR target)
static const WCHAR x86_envnameW[]
#define GetProcAddress(x, y)
struct _LOCAL_PRINTER_HANDLE * PLOCAL_PRINTER_HANDLE
static const WCHAR dependent_filesW[]
BOOL InitializePrinterDrivers(VOID)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define ERROR_INVALID_LEVEL
static void _LocalGetPrinterDriverLevel3(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_3W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
static const WCHAR version3_regpathW[]
static const WCHAR x64_subdirW[]
struct _DRIVER_INFO_8W DRIVER_INFO_8W
enum _LOCAL_HANDLE::@4890 HandleType
static const WCHAR win40_envnameW[]
#define HeapFree(x, y, z)
#define RegCloseKey(hKey)
#define ERROR_INVALID_ENVIRONMENT
struct _DRIVER_INFO_5W DRIVER_INFO_5W
#define HKEY_LOCAL_MACHINE
#define ERROR_INSUFFICIENT_BUFFER
GLuint const GLchar * name