mscoree: Improve GetCORVersion.
This commit is contained in:
parent
a8528706ac
commit
042f23cacc
|
@ -348,20 +348,19 @@ HRESULT WINAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwL
|
|||
|
||||
HRESULT WINAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
|
||||
{
|
||||
static const WCHAR version[] = {'v','1','.','1','.','4','3','2','2',0};
|
||||
static const WCHAR version[] = {'v','2','.','0','.','5','0','7','2','7',0};
|
||||
|
||||
FIXME("(%p, %d, %p): semi-stub!\n", pbuffer, cchBuffer, dwLength);
|
||||
|
||||
if (!dwLength)
|
||||
if (!dwLength || !pbuffer)
|
||||
return E_POINTER;
|
||||
|
||||
*dwLength = lstrlenW(version);
|
||||
|
||||
if (cchBuffer < *dwLength)
|
||||
return ERROR_INSUFFICIENT_BUFFER;
|
||||
return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
|
||||
|
||||
if (pbuffer)
|
||||
lstrcpyW(pbuffer, version);
|
||||
lstrcpyW(pbuffer, version);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -51,10 +51,10 @@ static void test_versioninfo(void)
|
|||
HRESULT hr;
|
||||
|
||||
hr = pGetCORVersion(NULL, MAX_PATH, &size);
|
||||
todo_wine ok(hr == E_POINTER,"GetCORVersion returned %08x\n", hr);
|
||||
ok(hr == E_POINTER,"GetCORVersion returned %08x\n", hr);
|
||||
|
||||
hr = pGetCORVersion(version, 1, &size);
|
||||
todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),"GetCORVersion returned %08x\n", hr);
|
||||
ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),"GetCORVersion returned %08x\n", hr);
|
||||
|
||||
hr = pGetCORVersion(version, MAX_PATH, &size);
|
||||
ok(hr == S_OK,"GetCORVersion returned %08x\n", hr);
|
||||
|
|
Loading…
Reference in New Issue