47 if (pCLRCreateInstance)
48 hr = pCLRCreateInstance(&CLSID_CLRMetaHost, &IID_ICLRMetaHost, (
void**)&
metahost);
52 win_skip(
".NET 4 is not installed\n");
76 hr = ICLRMetaHost_EnumerateInstalledRuntimes(
metahost, &runtime_enum);
77 ok(
hr ==
S_OK,
"EnumerateInstalledRuntimes returned %x\n",
hr);
80 while ((
hr = IEnumUnknown_Next(runtime_enum, 1, &unk, &
count)) ==
S_OK)
82 hr = IUnknown_QueryInterface(unk, &IID_ICLRRuntimeInfo, (
void**)&runtime_info);
83 ok(
hr ==
S_OK,
"QueryInterface returned %x\n",
hr);
86 hr = ICLRRuntimeInfo_GetVersionString(runtime_info,
buf, &
count);
88 ok(
count > 1,
"GetVersionString returned count %u\n",
count);
91 hr = ICLRRuntimeInfo_GetVersionString(runtime_info,
NULL, &
count);
92 ok(
hr ==
S_OK,
"GetVersionString returned %x\n",
hr);
93 ok(
count > 1 &&
count != 0xdeadbeef,
"GetVersionString returned count %u\n",
count);
96 hr = ICLRRuntimeInfo_GetVersionString(runtime_info,
buf, &
count);
97 ok(
hr ==
S_OK,
"GetVersionString returned %x\n",
hr);
98 ok(
count > 1,
"GetVersionString returned count %u\n",
count);
102 ICLRRuntimeInfo_Release(runtime_info);
104 IUnknown_Release(unk);
109 IEnumUnknown_Release(runtime_enum);
114 static const WCHAR twodotzero[] = {
'v',
'2',
'.',
'0',
'.',
'5',
'0',
'7',
'2',
'7',0};
115 static const WCHAR twodotzerodotzero[] = {
'v',
'2',
'.',
'0',
'.',
'0',0};
124 hr = ICLRMetaHost_GetRuntime(
metahost, twodotzero, &IID_ICLRRuntimeInfo, (
void**)&
info);
129 ok(
hr ==
S_OK,
"GetVersion failed, hr=%x\n",
hr);
134 ok(
hr ==
S_OK,
"GetVersionString returned %x\n",
hr);
138 ICLRRuntimeInfo_Release(
info);
141 hr = ICLRMetaHost_GetRuntime(
metahost, twodotzerodotzero, &IID_ICLRRuntimeInfo, (
void**)&
info);
#define CLR_E_SHIM_RUNTIME
#define ERROR_INSUFFICIENT_BUFFER
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
#define HRESULT_FROM_WIN32(x)