128 const WCHAR wszMonitorsPath[] =
L"SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors";
132 DWORD cchPrintMonitorName;
145 TRACE(
"InitializePrintMonitorList()\n");
154 ERR(
"RegOpenKeyExW failed with status %lu!\n", dwErrorCode);
159 dwErrorCode = (
DWORD)
RegQueryInfoKeyW(
hKey,
NULL,
NULL,
NULL, &dwSubKeys, &cchMaxSubKey,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
162 ERR(
"RegQueryInfoKeyW failed with status %lu!\n", dwErrorCode);
167 for (
i = 0;
i < dwSubKeys;
i++)
176 if (pwszRegistryPath)
179 pwszRegistryPath =
NULL;
191 pPrintMonitor =
NULL;
199 ERR(
"DllAllocSplMem failed!\n");
210 ERR(
"DllAllocSplMem failed!\n");
215 cchPrintMonitorName = cchMaxSubKey + 1;
219 ERR(
"RegEnumKeyExW failed for iteration %lu with status %lu!\n",
i, dwErrorCode);
227 ERR(
"RegOpenKeyExW failed for Print Provider \"%S\" with status %lu!\n", pPrintMonitor->
pwszName, dwErrorCode);
238 if (!hinstPrintMonitor)
244 pPrintMonitor->
hModule = hinstPrintMonitor;
248 if (pfnInitializePrintMonitor2)
265 FIXME(
"InitializePrintMonitor2 loaded.\n");
272 if (pfnInitializePrintMonitor)
275 pwszRegistryPath =
DllAllocSplMem((cchMonitorsPath + 1 + cchPrintMonitorName + 1) *
sizeof(
WCHAR));
276 if (!pwszRegistryPath)
279 ERR(
"DllAllocSplMem failed!\n");
283 CopyMemory(pwszRegistryPath, wszMonitorsPath, cchMonitorsPath *
sizeof(
WCHAR));
284 pwszRegistryPath[cchMonitorsPath] =
L'\\';
285 CopyMemory(&pwszRegistryPath[cchMonitorsPath + 1], pPrintMonitor->
pwszName, (cchPrintMonitorName + 1) *
sizeof(
WCHAR));
297 ERR(
"No initialization routine found for \"%S\"!\n", pPrintMonitor->
pwszFileName);
304 FIXME(
"InitializePrintMonitorList Handle %p\n",pPrintMonitor->
hMonitor);
308 pPrintMonitor =
NULL;
318 if (pwszRegistryPath)
LPMONITOR2(WINAPI * PInitializePrintMonitor2)(PMONITORINIT, PHANDLE)
HKEYMONITOR hckRegistryRoot
BOOL WINAPI DllFreeSplMem(PVOID pMem)
#define ERROR_NOT_ENOUGH_MEMORY
DWORD WINAPI GetLastError(VOID)
#define InsertTailList(ListHead, Entry)
PWSTR AllocAndRegQueryWSZ(HKEY hKey, PCWSTR pwszValueName)
struct _MONITORINIT MONITORINIT
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
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
#define InitializeListHead(ListHead)
LIST_ENTRY PrintMonitorList
LPMONITOREX(WINAPI * PInitializePrintMonitor)(PWSTR)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
struct _MONITOR2 * PMONITOR2
#define GetProcAddress(x, y)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
struct _MONITOREX * LPMONITOREX
#define RegCloseKey(hKey)
#define HKEY_LOCAL_MACHINE