13 TRACE(
"LocalGetPrinterData(%p, %S, %p, %p, %lu, %p)\n", hPrinter, pValueName, pType,
pData,
nSize,
pcbNeeded);
17 WARN(
"This function should never be called!\n");
24 const WCHAR wszBackslash[] =
L"\\";
30 if (!pKeyName || !*pKeyName)
63 ERR(
"RegOpenKeyExW failed for \"%S\" with error %lu!\n", pwszSubKey, dwErrorCode);
120 ERR(
"RegOpenKeyExW failed for \"Providers\" with error %lu!\n", dwErrorCode);
209 ERR(
"DsRoleGetPrimaryDomainInformation failed with error %lu!\n", dwErrorCode);
236 ERR(
"GetComputerNameW failed with error %lu!\n", dwErrorCode);
248 ERR(
"GetUserNameExW failed with error %lu!\n", dwErrorCode);
275 DWORD cchDnsName = 0;
282 ERR(
"GetComputerNameExW failed with error %lu!\n", dwErrorCode);
296 ERR(
"GetComputerNameExW failed with error %lu!\n", dwErrorCode);
321 TRACE(
"LocalGetPrinterDataEx(%p, %S, %S, %p, %p, %lu, %p)\n", hPrinter, pKeyName, pValueName, pType,
pData,
nSize,
pcbNeeded);
343 else if (pHandle->
HandleType == HandleType_Printer)
347 else if (pHandle->
HandleType == HandleType_PrintServer)
363 TRACE(
"LocalSetPrinterData(%p, %S, %lu, %p, %lu)\n", hPrinter, pValueName,
Type,
pData, cbData);
367 WARN(
"This function should never be called!\n");
386 ERR(
"RegOpenKeyExW failed for \"%S\" with error %lu!\n", pwszSubKey, dwErrorCode);
422 wcsicmp(pValueName,
L"NoRemotePrinterDrivers") == 0)
429 ERR(
"RegOpenKeyExW failed for \"Providers\" with error %lu!\n", dwErrorCode);
439 WARN(
"Attempting to set WebShareMgmt, which is based on IIS and therefore not supported. Returning fake success!\n");
455 TRACE(
"LocalSetPrinterDataEx(%p, %S, %S, %lu, %p, %lu)\n", hPrinter, pKeyName, pValueName,
Type,
pData, cbData);
461 else if (pHandle->
HandleType == HandleType_Printer)
465 else if (pHandle->
HandleType == HandleType_PrintServer)
#define ERROR_INVALID_PARAMETER
#define SPLREG_ARCHITECTURE
ULONG dwOSVersionInfoSize
enum _LOCAL_HANDLE::@4925 HandleType
static DWORD _LocalGetPrinterHandleData(PLOCAL_PRINTER_HANDLE pPrinterHandle, PCWSTR pKeyName, PCWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
#define SPLREG_SCHEDULER_THREAD_PRIORITY
DWORD WINAPI LocalGetPrinterDataEx(HANDLE hPrinter, PCWSTR pKeyName, PCWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
static DWORD _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
struct _OSVERSIONINFOEXW * POSVERSIONINFOEXW
struct _OSVERSIONINFOW * POSVERSIONINFOW
BOOL WINAPI DllFreeSplMem(PVOID pMem)
#define SPLREG_RETRY_POPUP
#define ERROR_INVALID_HANDLE
*nSize LPSTR _Inout_ LPDWORD nSize
#define SPLREG_DS_PRESENT
#define SPLREG_REMOTE_FAX
#define ERROR_NOT_ENOUGH_MEMORY
DWORD WINAPI GetLastError(VOID)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
const DWORD dwSpoolerMinorVersion
STRSAFEAPI StringCbCopyExW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer, LPDWORD nSize)
const DWORD cbCurrentEnvironment
VOID WINAPI DsRoleFreeMemory(_In_ PVOID Buffer)
#define SPLREG_MINOR_VERSION
const WCHAR wszCurrentEnvironment[]
struct _LOCAL_HANDLE * PLOCAL_HANDLE
LONG WINAPI RegCloseKey(HKEY hKey)
#define SPLREG_DEFAULT_SPOOL_DIRECTORY
#define SPLREG_ALLOW_USER_MANAGEFORMS
static DWORD _MakePrinterSubKey(PLOCAL_PRINTER_HANDLE pPrinterHandle, PCWSTR pKeyName, PWSTR *ppwszSubKey)
static DWORD DWORD void LPSTR DWORD cch
#define SPLREG_RESTART_JOB_ON_POOL_ENABLED
#define SPLREG_PORT_THREAD_PRIORITY_DEFAULT
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
DWORD WINAPI DsRoleGetPrimaryDomainInformation(LPCWSTR lpServer, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, PBYTE *Buffer)
const DWORD dwSpoolerMajorVersion
ULONG dwOSVersionInfoSize
#define SPLREG_DS_PRESENT_FOR_USER
#define SPLREG_WEBSHAREMGMT
struct _OSVERSIONINFOW OSVERSIONINFOW
static const WCHAR Cleanup[]
struct _OSVERSIONINFOEXW OSVERSIONINFOEXW
#define MAX_COMPUTERNAME_LENGTH
_CRTIMP wchar_t *__cdecl _wcslwr(_Inout_z_ wchar_t *_String)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
DWORD WINAPI LocalSetPrinterData(HANDLE hPrinter, PWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
_In_ DWORD _Out_ PDWORD pcbNeeded
#define SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT
static DWORD _LocalSetPrintServerHandleData(PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
#define SPLREG_OS_VERSIONEX
DWORD WINAPI LocalSetPrinterDataEx(HANDLE hPrinter, PCWSTR pKeyName, PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
#define SPLREG_OS_VERSION
BOOLEAN WINAPI GetUserNameExW(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
#define SPLREG_RESTART_JOB_ON_POOL_ERROR
#define SPLREG_BEEP_ENABLED
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
#define SPLREG_DNS_MACHINE_NAME
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
static DWORD _LocalSetPrinterHandleData(PLOCAL_PRINTER_HANDLE pPrinterHandle, PCWSTR pKeyName, PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
DWORD WINAPI LocalGetPrinterData(HANDLE hPrinter, PWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define SPLREG_MAJOR_VERSION
#define SPLREG_PORT_THREAD_PRIORITY
#define SPLREG_NET_POPUP_TO_COMPUTER