[LOCALSPL]

Report any error that occured inside _OpenEnvironment.

svn path=/branches/colins-printing-for-freedom/; revision=68409
This commit is contained in:
Colin Finck 2015-07-17 13:00:49 +00:00
parent a758d604df
commit c8574e64e1

View file

@ -146,7 +146,10 @@ InitializePrintProcessorList()
// Open the environment registry key.
dwErrorCode = _OpenEnvironment(NULL, &hKey);
if (dwErrorCode != ERROR_SUCCESS)
{
ERR("_OpenEnvironment failed with error %lu!\n", dwErrorCode);
goto Cleanup;
}
// Open the "Print Processors" subkey.
dwErrorCode = (DWORD)RegOpenKeyExW(hKey, L"Print Processors", 0, KEY_READ, &hSubKey);
@ -477,7 +480,10 @@ LocalEnumPrintProcessors(LPWSTR pName, LPWSTR pEnvironment, DWORD Level, LPBYTE
// We use the registry and not the PrintProcessorList here, because the caller may request information about a different environment.
dwErrorCode = _OpenEnvironment(pEnvironment, &hKey);
if (dwErrorCode != ERROR_SUCCESS)
{
ERR("_OpenEnvironment failed with error %lu!\n", dwErrorCode);
goto Cleanup;
}
// Open the "Print Processors" subkey.
dwErrorCode = (DWORD)RegOpenKeyExW(hKey, L"Print Processors", 0, KEY_READ, &hSubKey);
@ -632,7 +638,10 @@ LocalGetPrintProcessorDirectory(LPWSTR pName, LPWSTR pEnvironment, DWORD Level,
// Verify pEnvironment and open its registry key.
dwErrorCode = _OpenEnvironment(pEnvironment, &hKey);
if (dwErrorCode != ERROR_SUCCESS)
{
ERR("_OpenEnvironment failed with error %lu!\n", dwErrorCode);
goto Cleanup;
}
// Determine the size of the required buffer.
dwErrorCode = (DWORD)RegQueryValueExW(hKey, L"Directory", NULL, NULL, NULL, pcbNeeded);