winspool: When retrieving PRINTER_INFO_7, the lack of a directory service print queue object is represented with a NULL pointer and a successful return, not an error return.
This commit is contained in:
parent
eae3c3cacc
commit
c5a0f9316d
|
@ -3514,8 +3514,11 @@ static BOOL WINSPOOL_GetPrinter_7(HKEY hkeyPrinter, PRINTER_INFO_7W *pi7, LPBYTE
|
|||
|
||||
*pcbNeeded = 0;
|
||||
|
||||
if (WINSPOOL_GetStringFromReg(hkeyPrinter, ObjectGUIDW, ptr, left, &size, unicode))
|
||||
if (! WINSPOOL_GetStringFromReg(hkeyPrinter, ObjectGUIDW, ptr, left, &size, unicode))
|
||||
{
|
||||
ptr = NULL;
|
||||
size = sizeof(pi7->pszObjectGUID);
|
||||
}
|
||||
if (space && size <= left) {
|
||||
pi7->pszObjectGUID = (LPWSTR)ptr;
|
||||
ptr += size;
|
||||
|
@ -3523,7 +3526,6 @@ static BOOL WINSPOOL_GetPrinter_7(HKEY hkeyPrinter, PRINTER_INFO_7W *pi7, LPBYTE
|
|||
} else
|
||||
space = FALSE;
|
||||
*pcbNeeded += size;
|
||||
}
|
||||
if (pi7) {
|
||||
/* We do not have a Directory Service */
|
||||
pi7->dwAction = DSPRINT_UNPUBLISH;
|
||||
|
|
|
@ -2260,12 +2260,6 @@ static void test_GetPrinter(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
filled = -1;
|
||||
ret = GetPrinter(hprn, level, buf, needed, &filled);
|
||||
if (level == 7 && needed == sizeof(PRINTER_INFO_7A))
|
||||
{
|
||||
todo_wine
|
||||
ok(ret, "level %d: GetPrinter error %d\n", level, GetLastError());
|
||||
}
|
||||
else
|
||||
ok(needed == filled, "needed %d != filled %d\n", needed, filled);
|
||||
|
||||
if (level == 2)
|
||||
|
|
Loading…
Reference in New Issue