Lines Matching refs:pPrintMonitor
31 PLOCAL_PRINT_MONITOR pPrintMonitor; in FindPrintMonitor() local
40 pPrintMonitor = CONTAINING_RECORD(pEntry, LOCAL_PRINT_MONITOR, Entry); in FindPrintMonitor()
42 if (_wcsicmp(pPrintMonitor->pwszName, pwszName) == 0) in FindPrintMonitor()
43 return pPrintMonitor; in FindPrintMonitor()
142 PLOCAL_PRINT_MONITOR pPrintMonitor = NULL; in InitializePrintMonitorList() local
182 if (pPrintMonitor) in InitializePrintMonitorList()
184 if (pPrintMonitor->pwszFileName) in InitializePrintMonitorList()
185 DllFreeSplMem(pPrintMonitor->pwszFileName); in InitializePrintMonitorList()
187 if (pPrintMonitor->pwszName) in InitializePrintMonitorList()
188 DllFreeSplMem(pPrintMonitor->pwszName); in InitializePrintMonitorList()
190 DllFreeSplMem(pPrintMonitor); in InitializePrintMonitorList()
191 pPrintMonitor = NULL; in InitializePrintMonitorList()
195 pPrintMonitor = DllAllocSplMem(sizeof(LOCAL_PRINT_MONITOR)); in InitializePrintMonitorList()
196 if (!pPrintMonitor) in InitializePrintMonitorList()
203 memset( pPrintMonitor, 0, sizeof(LOCAL_PRINT_MONITOR)); in InitializePrintMonitorList()
206 pPrintMonitor->pwszName = DllAllocSplMem((cchMaxSubKey + 1) * sizeof(WCHAR)); in InitializePrintMonitorList()
207 if (!pPrintMonitor->pwszName) in InitializePrintMonitorList()
216 …dwErrorCode = (DWORD)RegEnumKeyExW(hKey, i, pPrintMonitor->pwszName, &cchPrintMonitorName, NULL, N… in InitializePrintMonitorList()
224 dwErrorCode = (DWORD)RegOpenKeyExW(hKey, pPrintMonitor->pwszName, 0, KEY_READ, &hSubKey); in InitializePrintMonitorList()
227 …ERR("RegOpenKeyExW failed for Print Provider \"%S\" with status %lu!\n", pPrintMonitor->pwszName, … in InitializePrintMonitorList()
232 pPrintMonitor->pwszFileName = AllocAndRegQueryWSZ(hSubKey, L"Driver"); in InitializePrintMonitorList()
233 if (!pPrintMonitor->pwszFileName) in InitializePrintMonitorList()
237 hinstPrintMonitor = LoadLibraryW(pPrintMonitor->pwszFileName); in InitializePrintMonitorList()
240 …ERR("LoadLibraryW failed for \"%S\" with error %lu!\n", pPrintMonitor->pwszFileName, GetLastError(… in InitializePrintMonitorList()
244 pPrintMonitor->hModule = hinstPrintMonitor; in InitializePrintMonitorList()
259 …pPrintMonitor->pMonitor = (PMONITOR2)pfnInitializePrintMonitor2(&MonitorInit, &pPrintMonitor->hMon… in InitializePrintMonitorList()
260 if (!pPrintMonitor->pMonitor) in InitializePrintMonitorList()
262 …ERR("InitializePrintMonitor2 failed for \"%S\" with error %lu!\n", pPrintMonitor->pwszFileName, Ge… in InitializePrintMonitorList()
266 pPrintMonitor->bIsLevel2 = TRUE; in InitializePrintMonitorList()
285 …CopyMemory(&pwszRegistryPath[cchMonitorsPath + 1], pPrintMonitor->pwszName, (cchPrintMonitorName +… in InitializePrintMonitorList()
288 pPrintMonitor->pMonitor = (LPMONITOREX)pfnInitializePrintMonitor(pwszRegistryPath); in InitializePrintMonitorList()
289 if (!pPrintMonitor->pMonitor) in InitializePrintMonitorList()
291 …ERR("InitializePrintMonitor failed for \"%S\" with error %lu!\n", pPrintMonitor->pwszFileName, Get… in InitializePrintMonitorList()
297 ERR("No initialization routine found for \"%S\"!\n", pPrintMonitor->pwszFileName); in InitializePrintMonitorList()
303 InsertTailList(&PrintMonitorList, &pPrintMonitor->Entry); in InitializePrintMonitorList()
304 FIXME("InitializePrintMonitorList Handle %p\n",pPrintMonitor->hMonitor); in InitializePrintMonitorList()
305 pPrintMonitor->refcount++; in InitializePrintMonitorList()
308 pPrintMonitor = NULL; in InitializePrintMonitorList()
321 if (pPrintMonitor) in InitializePrintMonitorList()
323 if (pPrintMonitor->pwszFileName) in InitializePrintMonitorList()
324 DllFreeSplMem(pPrintMonitor->pwszFileName); in InitializePrintMonitorList()
326 if (pPrintMonitor->pwszName) in InitializePrintMonitorList()
327 DllFreeSplMem(pPrintMonitor->pwszName); in InitializePrintMonitorList()
329 DllFreeSplMem(pPrintMonitor); in InitializePrintMonitorList()
342 _LocalGetMonitorLevel1(PLOCAL_PRINT_MONITOR pPrintMonitor, PMONITOR_INFO_1W* ppMonitorInfo, PBYTE* … in _LocalGetMonitorLevel1() argument
350 cbMonitorName = (wcslen(pPrintMonitor->pwszName) + 1) * sizeof(WCHAR); in _LocalGetMonitorLevel1()
357 pwszStrings[0] = pPrintMonitor->pwszName; in _LocalGetMonitorLevel1()
365 _LocalGetMonitorLevel2(PLOCAL_PRINT_MONITOR pPrintMonitor, PMONITOR_INFO_2W* ppMonitorInfo, PBYTE* … in _LocalGetMonitorLevel2() argument
374 cbMonitorName = (wcslen(pPrintMonitor->pwszName) + 1) * sizeof(WCHAR); in _LocalGetMonitorLevel2()
375 cbFileName = (wcslen(pPrintMonitor->pwszFileName) + 1) * sizeof(WCHAR); in _LocalGetMonitorLevel2()
382 pwszStrings[0] = pPrintMonitor->pwszName; in _LocalGetMonitorLevel2()
388 pwszStrings[2] = pPrintMonitor->pwszFileName; in _LocalGetMonitorLevel2()
401 PLOCAL_PRINT_MONITOR pPrintMonitor; in LocalEnumMonitors() local
419 pPrintMonitor = CONTAINING_RECORD(pEntry, LOCAL_PRINT_MONITOR, Entry); in LocalEnumMonitors()
422 _LocalGetMonitorLevel1(pPrintMonitor, NULL, NULL, pcbNeeded); in LocalEnumMonitors()
424 _LocalGetMonitorLevel2(pPrintMonitor, NULL, NULL, pcbNeeded); in LocalEnumMonitors()
439 pPrintMonitor = CONTAINING_RECORD(pEntry, LOCAL_PRINT_MONITOR, Entry); in LocalEnumMonitors()
442 … _LocalGetMonitorLevel1(pPrintMonitor, (PMONITOR_INFO_1W*)&pMonitors, &pMonitorInfoEnd, NULL); in LocalEnumMonitors()
444 … _LocalGetMonitorLevel2(pPrintMonitor, (PMONITOR_INFO_2W*)&pMonitors, &pMonitorInfoEnd, NULL); in LocalEnumMonitors()
471 PLOCAL_PRINT_MONITOR pPrintMonitor = NULL; in AddPrintMonitorList() local
488 pPrintMonitor = DllAllocSplMem(sizeof(LOCAL_PRINT_MONITOR)); in AddPrintMonitorList()
489 if (!pPrintMonitor) in AddPrintMonitorList()
496 memset( pPrintMonitor, 0, sizeof(LOCAL_PRINT_MONITOR)); in AddPrintMonitorList()
499 pPrintMonitor->pwszName = AllocSplStr( pName ); in AddPrintMonitorList()
500 if (!pPrintMonitor->pwszName) in AddPrintMonitorList()
507 cchPrintMonitorName = wcslen(pPrintMonitor->pwszName); in AddPrintMonitorList()
521 pPrintMonitor->pwszFileName = DllName; in AddPrintMonitorList()
531 pPrintMonitor->pwszFileName = AllocSplStr( DllName ); in AddPrintMonitorList()
535 hinstPrintMonitor = LoadLibraryW(pPrintMonitor->pwszFileName); in AddPrintMonitorList()
538 …ERR("LoadLibraryW failed for \"%S\" with error %lu!\n", pPrintMonitor->pwszFileName, GetLastError(… in AddPrintMonitorList()
543 pPrintMonitor->hModule = hinstPrintMonitor; in AddPrintMonitorList()
558 …pPrintMonitor->pMonitor = (PMONITOR2)pfnInitializePrintMonitor2(&MonitorInit, &pPrintMonitor->hMon… in AddPrintMonitorList()
559 if (!pPrintMonitor->pMonitor) in AddPrintMonitorList()
561 …ERR("InitializePrintMonitor2 failed for \"%S\" with error %lu!\n", pPrintMonitor->pwszFileName, Ge… in AddPrintMonitorList()
565 pPrintMonitor->bIsLevel2 = TRUE; in AddPrintMonitorList()
584 …CopyMemory(&pwszRegistryPath[cchMonitorsPath + 1], pPrintMonitor->pwszName, (cchPrintMonitorName +… in AddPrintMonitorList()
587 pPrintMonitor->pMonitor = (LPMONITOREX)pfnInitializePrintMonitor(pwszRegistryPath); in AddPrintMonitorList()
588 if (!pPrintMonitor->pMonitor) in AddPrintMonitorList()
590 …ERR("InitializePrintMonitor failed for \"%S\" with error %lu!\n", pPrintMonitor->pwszFileName, Get… in AddPrintMonitorList()
596 ERR("No initialization routine found for \"%S\"!\n", pPrintMonitor->pwszFileName); in AddPrintMonitorList()
602 InsertTailList(&PrintMonitorList, &pPrintMonitor->Entry); in AddPrintMonitorList()
603 FIXME("AddPrintMonitorList Handle %p\n",pPrintMonitor->hMonitor); in AddPrintMonitorList()
605 pPrintMonitor->refcount++; in AddPrintMonitorList()
608 pPrintMonitor = NULL; in AddPrintMonitorList()
616 if (pPrintMonitor) in AddPrintMonitorList()
618 if (pPrintMonitor->pwszFileName) in AddPrintMonitorList()
619 DllFreeSplMem(pPrintMonitor->pwszFileName); in AddPrintMonitorList()
621 if (pPrintMonitor->pwszName) in AddPrintMonitorList()
622 DllFreeSplMem(pPrintMonitor->pwszName); in AddPrintMonitorList()
624 DllFreeSplMem(pPrintMonitor); in AddPrintMonitorList()
728 PLOCAL_PRINT_MONITOR pPrintMonitor; in LocalDeleteMonitor() local
750 pPrintMonitor = FindPrintMonitor( pMonitorName ); in LocalDeleteMonitor()
751 if ( pPrintMonitor ) in LocalDeleteMonitor()
753 if ( pPrintMonitor->refcount ) pPrintMonitor->refcount--; in LocalDeleteMonitor()
755 if ( pPrintMonitor->refcount == 0 ) in LocalDeleteMonitor()
757 RemoveEntryList(&pPrintMonitor->Entry); in LocalDeleteMonitor()
759 if ( pPrintMonitor->bIsLevel2 ) in LocalDeleteMonitor()
761 PMONITOR2 pm2 = pPrintMonitor->pMonitor; in LocalDeleteMonitor()
764 pm2->pfnShutdown(pPrintMonitor->hMonitor); in LocalDeleteMonitor()
768 if ( pPrintMonitor->hModule ) in LocalDeleteMonitor()
769 FreeLibrary(pPrintMonitor->hModule); in LocalDeleteMonitor()
771 if (pPrintMonitor->pwszFileName) in LocalDeleteMonitor()
772 DllFreeSplStr(pPrintMonitor->pwszFileName); in LocalDeleteMonitor()
774 if (pPrintMonitor->pwszName) in LocalDeleteMonitor()
775 DllFreeSplStr(pPrintMonitor->pwszName); in LocalDeleteMonitor()
777 DllFreeSplMem(pPrintMonitor); in LocalDeleteMonitor()
778 pPrintMonitor = NULL; in LocalDeleteMonitor()