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