diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index e3614835088..f92d56e98c8 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -2097,7 +2097,7 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) DWORD ret = ExpandEnvironmentStringsW(szSrc, szDest, MAX_PATH); if (ret > MAX_PATH) - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = E_NOT_SUFFICIENT_BUFFER; else if (ret == 0) hr = HRESULT_FROM_WIN32(GetLastError()); else diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index 695e55810ca..815a421c934 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -247,7 +247,7 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface, else { /* should never reach here, but for completeness */ - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = E_NOT_SUFFICIENT_BUFFER; } } } diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index efdfbbd5893..e2277ecdb0f 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -878,7 +878,7 @@ if (0) { /* crashes */ ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); } hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "expected 0x8007007a, got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "expected E_NOT_SUFFICIENT_BUFFER, got 0x%08x\n", hr); hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len + 1); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);