Commit 6d149d85 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Use RegQueryInfoKey to count number of printers.

parent 8354d168
......@@ -1034,9 +1034,12 @@ BOOL WINAPI EnumPrintersA(
return FALSE;
}
while(RegEnumKeyA(hkeyPrinters, number, NULL, 0) == ERROR_SUCCESS)
number++;
if(RegQueryInfoKeyA(hkeyPrinters, NULL, NULL, NULL, &number, NULL, NULL,
NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
RegCloseKey(hkeyPrinters);
ERR("Can't query Printers key\n");
return FALSE;
}
TRACE("Found %ld printers\n", number);
switch(dwLevel) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment