Commit d92d108a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

fusion: Use E_NOT_SUFFICIENT_BUFFER definition.

parent 477dfbca
......@@ -497,7 +497,7 @@ HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len)
if (*len <= buffer_size)
lstrcpyW(buf, name->path);
else
return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
return E_NOT_SUFFICIENT_BUFFER;
return S_OK;
}
......
......@@ -161,7 +161,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
len++;
if (*pcchPath <= len || !pwzCachePath)
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
hr = E_NOT_SUFFICIENT_BUFFER;
else if (pwzCachePath)
strcpyW(pwzCachePath, path);
......
......@@ -1235,8 +1235,7 @@ static void test_QueryAssemblyInfo(void)
"Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags);
ok(info.uliAssemblySizeInKB.u.HighPart == 0,
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
"Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr);
todo_wine
{
ok((info.uliAssemblySizeInKB.u.LowPart == 4),
......@@ -1258,8 +1257,7 @@ static void test_QueryAssemblyInfo(void)
"Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart);
ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty),
"Assembly path was changed\n");
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
"Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr);
todo_wine
{
ok((info.uliAssemblySizeInKB.u.LowPart == 4),
......@@ -1321,7 +1319,7 @@ static void test_QueryAssemblyInfo(void)
lstrcatW(name, otherver);
hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE,
name, &info);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr);
ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n", info.dwAssemblyFlags);
/* short buffer, QUERYASMINFO_FLAG_GETSIZE */
......@@ -1331,7 +1329,7 @@ static void test_QueryAssemblyInfo(void)
lstrcatW(name, otherver);
hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE,
name, &info);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr);
ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n", info.dwAssemblyFlags);
/* display name is "wine, Version=1.0.0.00000" */
......@@ -1525,8 +1523,7 @@ static void test_QueryAssemblyInfo(void)
lstrcatW(name, commasep);
lstrcatW(name, ver);
hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
"Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr);
ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO),
"Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo);
ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED,
......
......@@ -98,16 +98,14 @@ static void test_GetCachePath(void)
/* NULL pwzCachePath, pcchPath is 0 */
size = 0;
hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
"Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr);
ok(size == lstrlenW(cachepath) + 1,
"Expected %d, got %d\n", lstrlenW(cachepath) + 1, size);
/* NULL pwszCachePath, pcchPath is MAX_PATH */
size = MAX_PATH;
hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
"Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr);
ok(size == lstrlenW(cachepath) + 1,
"Expected %d, got %d\n", lstrlenW(cachepath) + 1, size);
......@@ -132,8 +130,7 @@ static void test_GetCachePath(void)
lstrcpyW(path, nochange);
size = lstrlenW(cachepath);
hr = pGetCachePath(ASM_CACHE_GAC, path, &size);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),
"Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr);
ok( !lstrcmpW( nochange, path ), "Expected %s, got %s\n", wine_dbgstr_w(nochange), wine_dbgstr_w(path));
lstrcpyW(cachepath, windir);
......
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