mscoree: Use E_NOT_SUFFICIENT_BUFFER definition.

This commit is contained in:
Nikolay Sivov 2014-10-16 00:00:23 +04:00 committed by Alexandre Julliard
parent 5cb10c96b2
commit a99d8cb21b
3 changed files with 8 additions and 8 deletions

View File

@ -360,7 +360,7 @@ static HRESULT WINAPI CLRRuntimeInfo_GetVersionString(ICLRRuntimeInfo* iface,
if (buffer_size >= *pcchBuffer)
MultiByteToWideChar(CP_UTF8, 0, version, -1, pwzBuffer, buffer_size);
else
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
hr = E_NOT_SUFFICIENT_BUFFER;
}
return hr;
@ -421,7 +421,7 @@ static HRESULT WINAPI CLRRuntimeInfo_GetRuntimeDirectory(ICLRRuntimeInfo* iface,
if (buffer_size >= size)
strcpyW(pwzBuffer, system_dir);
else
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
hr = E_NOT_SUFFICIENT_BUFFER;
}
return hr;
@ -1051,7 +1051,7 @@ HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost* iface,
if (buffer_size >= *pcchBuffer)
MultiByteToWideChar(CP_UTF8, 0, version, -1, pwzBuffer, buffer_size);
else
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
hr = E_NOT_SUFFICIENT_BUFFER;
}
}

View File

@ -122,7 +122,7 @@ static void test_enumruntimes(void)
count = 1;
hr = ICLRRuntimeInfo_GetVersionString(runtime_info, buf, &count);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetVersionString returned %x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetVersionString returned %x\n", hr);
ok(count > 1, "GetVersionString returned count %u\n", count);
count = 0xdeadbeef;

View File

@ -92,7 +92,7 @@ static void test_versioninfo(void)
return;
}
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),"GetCORVersion returned %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetCORVersion returned %08x\n", hr);
hr = pGetCORVersion(version, MAX_PATH, &size);
ok(hr == S_OK,"GetCORVersion returned %08x\n", hr);
@ -107,12 +107,12 @@ static void test_versioninfo(void)
path_len = size;
hr = pGetCORSystemDirectory(path, path_len-1 , &size);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetCORSystemDirectory returned %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetCORSystemDirectory returned %08x\n", hr);
if (0) /* crashes on <= w2k3 */
{
hr = pGetCORSystemDirectory(NULL, MAX_PATH , &size);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetCORSystemDirectory returned %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetCORSystemDirectory returned %08x\n", hr);
}
hr = pGetCORSystemDirectory(path, MAX_PATH , NULL);
@ -140,7 +140,7 @@ static void test_versioninfo(void)
ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr);
hr = pGetRequestedRuntimeInfo( NULL, v2_0, NULL, 0, 0, path, 1, &path_len, version, MAX_PATH, &size);
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "GetRequestedRuntimeInfo returned %08x\n", hr);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetRequestedRuntimeInfo returned %08x\n", hr);
/* if one of the buffers is NULL, the other one is still happily filled */
memset(version, 0, sizeof(version));