Use RegQueryInfoKey to count number of printers.
This commit is contained in:
parent
8354d16897
commit
6d149d85d8
@ -1034,9 +1034,12 @@ BOOL WINAPI EnumPrintersA(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(RegEnumKeyA(hkeyPrinters, number, NULL, 0) == ERROR_SUCCESS)
|
if(RegQueryInfoKeyA(hkeyPrinters, NULL, NULL, NULL, &number, NULL, NULL,
|
||||||
number++;
|
NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
|
||||||
|
RegCloseKey(hkeyPrinters);
|
||||||
|
ERR("Can't query Printers key\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
TRACE("Found %ld printers\n", number);
|
TRACE("Found %ld printers\n", number);
|
||||||
|
|
||||||
switch(dwLevel) {
|
switch(dwLevel) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user