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)
const WCHAR wszCurrentEnvironment[]
#define RegCloseKey(hKey)
BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer, LPDWORD nSize)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
static const WCHAR Cleanup[]
@ DsRole_RoleMemberWorkstation
@ DsRole_RoleMemberServer
@ DsRolePrimaryDomainInfoBasic
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static DWORD DWORD void LPSTR DWORD cch
VOID WINAPI DsRoleFreeMemory(_In_ PVOID Buffer)
DWORD WINAPI DsRoleGetPrimaryDomainInformation(LPCWSTR lpServer, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, PBYTE *Buffer)
static DWORD _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
DWORD WINAPI LocalGetPrinterData(HANDLE hPrinter, PWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
static DWORD _LocalSetPrinterHandleData(PLOCAL_PRINTER_HANDLE pPrinterHandle, PCWSTR pKeyName, PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
static DWORD _LocalSetPrintServerHandleData(PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
DWORD WINAPI LocalGetPrinterDataEx(HANDLE hPrinter, PCWSTR pKeyName, PCWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
DWORD WINAPI LocalSetPrinterData(HANDLE hPrinter, PWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
DWORD WINAPI LocalSetPrinterDataEx(HANDLE hPrinter, PCWSTR pKeyName, PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
static DWORD _LocalGetPrinterHandleData(PLOCAL_PRINTER_HANDLE pPrinterHandle, PCWSTR pKeyName, PCWSTR pValueName, PDWORD pType, PBYTE pData, DWORD nSize, PDWORD pcbNeeded)
static DWORD _MakePrinterSubKey(PLOCAL_PRINTER_HANDLE pPrinterHandle, PCWSTR pKeyName, PWSTR *ppwszSubKey)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl _wcslwr(_Inout_z_ wchar_t *_String)
BOOLEAN WINAPI GetUserNameExW(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
STRSAFEAPI StringCbCopyExW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
DSROLE_MACHINE_ROLE MachineRole
enum _LOCAL_HANDLE::@5125 HandleType
ULONG dwOSVersionInfoSize
ULONG dwOSVersionInfoSize
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
BOOL WINAPI DllFreeSplMem(PVOID pMem)
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
const DWORD dwSpoolerMajorVersion
const DWORD dwSpoolerMinorVersion
const DWORD cbCurrentEnvironment
struct _LOCAL_HANDLE * PLOCAL_HANDLE
DWORD WINAPI GetLastError(void)
*nSize LPSTR _Inout_ LPDWORD nSize
#define MAX_COMPUTERNAME_LENGTH
_In_ DWORD _Out_ PDWORD pcbNeeded
#define SPLREG_ALLOW_USER_MANAGEFORMS
#define SPLREG_SCHEDULER_THREAD_PRIORITY
#define SPLREG_RESTART_JOB_ON_POOL_ENABLED
#define SPLREG_DS_PRESENT_FOR_USER
#define SPLREG_DNS_MACHINE_NAME
#define SPLREG_NET_POPUP_TO_COMPUTER
#define SPLREG_OS_VERSIONEX
#define SPLREG_ARCHITECTURE
#define SPLREG_PORT_THREAD_PRIORITY
#define SPLREG_DEFAULT_SPOOL_DIRECTORY
#define SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT
#define SPLREG_RESTART_JOB_ON_POOL_ERROR
#define SPLREG_REMOTE_FAX
#define SPLREG_OS_VERSION
#define SPLREG_MINOR_VERSION
#define SPLREG_PORT_THREAD_PRIORITY_DEFAULT
#define SPLREG_MAJOR_VERSION
#define SPLREG_BEEP_ENABLED
#define SPLREG_DS_PRESENT
#define SPLREG_WEBSHAREMGMT
#define SPLREG_RETRY_POPUP
struct _OSVERSIONINFOEXW * POSVERSIONINFOEXW
struct _OSVERSIONINFOW * POSVERSIONINFOW
struct _OSVERSIONINFOW OSVERSIONINFOW
struct _OSVERSIONINFOEXW OSVERSIONINFOEXW