From 0bd336a5733ea67091e3080b4a0ddfb2872a7511 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Sat, 4 Nov 2006 00:26:20 +0100 Subject: [PATCH] winspool: EnumPorts: Read driver from registry. --- dlls/winspool.drv/info.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index ced64982204..735662bca25 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -915,6 +915,18 @@ static monitor_t * monitor_load(LPWSTR name, LPWSTR dllname) lstrcpyW(regroot, MonitorsW); lstrcatW(regroot, name); /* Get the Driver from the Registry */ + if (driver == NULL) { + HKEY hroot; + DWORD namesize; + if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) { + if (RegQueryValueExW(hroot, DriverW, NULL, NULL, NULL, + &namesize) == ERROR_SUCCESS) { + driver = HeapAlloc(GetProcessHeap(), 0, namesize); + RegQueryValueExW(hroot, DriverW, NULL, NULL, (LPBYTE) driver, &namesize) ; + } + RegCloseKey(hroot); + } + } } pm->name = strdupW(name);