22static const WCHAR configuration_fileW[] = {
'C',
'o',
'n',
'f',
'i',
'g',
'u',
'r',
'a',
't',
'i',
'o',
'n',
' ',
'F',
'i',
'l',
'e',0};
25static 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 };
35static const WCHAR previous_namesW[] = {
'P',
'r',
'e',
'v',
'i',
'o',
'u',
's',
' ',
'N',
'a',
'm',
'e',
's',0};
40static const WCHAR driversW[] = {
'\\',
'd',
'r',
'i',
'v',
'e',
'r',
's',
'\\',0};
41static const WCHAR ia64_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'I',
'A',
'6',
'4',0};
43static const WCHAR version3_regpathW[] = {
'\\',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'-',
'3',0};
45static const WCHAR version0_regpathW[] = {
'\\',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'-',
'0',0};
48static const WCHAR x64_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'x',
'6',
'4',0};
50static const WCHAR x86_envnameW[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
' ',
'x',
'8',
'6',0};
52static 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);
static int multi_sz_lenW(const WCHAR *str)
const WCHAR wszCurrentEnvironment[]
#define RegCloseKey(hKey)
static LPCWSTR LPCWSTR LPCWSTR env
#define ERROR_INSUFFICIENT_BUFFER
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)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define ERROR_ACCESS_DENIED
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
static const WCHAR Cleanup[]
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
#define REG_OPTION_NON_VOLATILE
struct _DRIVER_INFO_2W DRIVER_INFO_2W
static const WCHAR previous_namesW[]
static void _LocalGetPrinterDriverLevel5(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_5W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static PRINTENV_T env_win40
static const DWORD di_sizeof[]
static WCHAR wszDriverPath[MAX_PATH]
static PPRINTENV_T all_printenv[]
static const WCHAR version3_regpathW[]
BOOL myAddPrinterDriverEx(DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags, BOOL lazy)
static PRINTENV_T env_ia64
static const WCHAR datatypeW[]
BOOL WINAPI LocalAddPrinterDriver(LPWSTR pName, DWORD level, LPBYTE pDriverInfo)
BOOL WINAPI LocalAddPrinterDriverEx(LPWSTR pName, DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags)
static DWORD dwDriverInfo2Offsets[]
static PRINTENV_T env_x86
static const PLocalPrinterDriverLevelFunc pfnPrinterDriverLevels[]
static const WCHAR help_fileW[]
static WCHAR * get_file_part(WCHAR *name)
static WCHAR wszLocalSplFile[MAX_PATH]
static void _LocalGetPrinterDriverLevel6(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_6W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static const WCHAR data_fileW[]
static const WCHAR ia64_envnameW[]
HKEY open_driver_reg(LPCWSTR pEnvironment)
static const WCHAR driverW[]
static const WCHAR configuration_fileW[]
static const WCHAR win40_envnameW[]
static void _LocalGetPrinterDriverLevel1(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_1W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static const WCHAR fmt_driversW[]
static HMODULE driver_load(const PRINTENV_T *env, LPWSTR dllname)
static const WCHAR dependent_filesW[]
static const WCHAR monitorW[]
static BOOL apd_copyfile(WCHAR *pathname, WCHAR *file_part, apd_data_t *apd)
static DWORD dwDriverInfo5Offsets[]
static const WCHAR version3_subdirW[]
static const WCHAR x64_subdirW[]
static const WCHAR spoolW[]
static WCHAR wszScratchPad[MAX_PATH]
static const WCHAR versionW[]
static DWORD dwDriverInfo4Offsets[]
static const WCHAR ia64_subdirW[]
static const WCHAR emptyW[]
static WCHAR wszPrintUiFile[MAX_PATH]
static DWORD dwDriverInfo3Offsets[]
BOOL InitializePrinterDrivers(VOID)
static void _LocalGetPrinterDriverLevel4(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_4W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static PRINTENV_T env_x64
static DWORD dwDriverInfo6Offsets[]
static const WCHAR backslashW[]
static DWORD dwDriverInfo8Offsets[]
static void _LocalGetPrinterDriverLevel3(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_3W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
static const WCHAR x86_envnameW[]
static DWORD dwDriverInfo1Offsets[]
static const WCHAR x64_envnameW[]
static const WCHAR driversW[]
BOOL WINAPI LocalGetPrinterDriverDirectory(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pDriverDirectory, DWORD cbBuf, PDWORD pcbNeeded)
BOOL WINAPI LocalGetPrinterDriver(HANDLE hPrinter, LPWSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf, LPDWORD pcbNeeded)
void(* PLocalPrinterDriverLevelFunc)(PLOCAL_PRINTER, PVOID, PBYTE *, PDWORD)
static const WCHAR version0_regpathW[]
static void ToMultiSz(LPWSTR pString)
static void _LocalGetPrinterDriverLevel2(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_2W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
PPRINTENV_T validate_envW(LPCWSTR env)
static void _LocalGetPrinterDriverLevel8(PLOCAL_PRINTER pPrinter, PDRIVER_INFO_8W *ppDriverInfo, PBYTE *ppDriverInfoEnd, PDWORD pcbNeeded)
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 x86_subdirW[]
BOOL WINAPI LocalEnumPrinterDrivers(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pDriverInfo, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
static const WCHAR win40_subdirW[]
static const WCHAR version0_subdirW[]
#define DRIVER_EVENT_INITIALIZE
DWORD WINAPI GetVersion()
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
enum _LOCAL_HANDLE::@5116 HandleType
PLOCAL_PRINT_MONITOR pPrintMonitor
PWSTR pwszDefaultDatatype
PLOCAL_PRINT_PROCESSOR pPrintProcessor
struct _SKIPLIST_NODE * Next[SKIPLIST_LEVELS]
WCHAR src[MAX_PATH+MAX_PATH]
WCHAR dst[MAX_PATH+MAX_PATH]
#define FIELD_OFFSET(t, f)
PCWSTR wszPrintProviderInfo[3]
LONG copy_servername_from_name(LPCWSTR name, LPWSTR target)
struct _LOCAL_PRINTER * PLOCAL_PRINTER
struct _LOCAL_PRINTER_HANDLE * PLOCAL_PRINTER_HANDLE
struct _LOCAL_HANDLE * PLOCAL_HANDLE
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ PDWORD pcbNeeded
#define ERROR_BUFFER_OVERFLOW
#define ERROR_INVALID_LEVEL
#define ERROR_INVALID_USER_BUFFER
#define ERROR_INVALID_ENVIRONMENT
#define HKEY_LOCAL_MACHINE
struct _DRIVER_INFO_6W DRIVER_INFO_6W
struct _DRIVER_INFO_1W DRIVER_INFO_1W
struct _DRIVER_INFO_5W DRIVER_INFO_5W
struct _DRIVER_INFO_4W DRIVER_INFO_4W
struct _DRIVER_INFO_3W DRIVER_INFO_3W
#define APD_COPY_NEW_FILES
#define APD_COPY_ALL_FILES
struct _DRIVER_INFO_8W DRIVER_INFO_8W
#define APD_COPY_FROM_DIRECTORY
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level