Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
79ed8429
Commit
79ed8429
authored
Sep 21, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add a test that enumerates .NET runtimes.
parent
d1dd372a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
metahost.c
dlls/mscoree/tests/metahost.c
+47
-0
No files found.
dlls/mscoree/tests/metahost.c
View file @
79ed8429
...
...
@@ -62,10 +62,57 @@ void cleanup(void)
FreeLibrary
(
hmscoree
);
}
void
test_enumruntimes
(
void
)
{
IEnumUnknown
*
runtime_enum
;
IUnknown
*
unk
;
DWORD
count
;
ICLRRuntimeInfo
*
runtime_info
;
HRESULT
hr
;
WCHAR
buf
[
MAX_PATH
];
hr
=
ICLRMetaHost_EnumerateInstalledRuntimes
(
metahost
,
&
runtime_enum
);
ok
(
hr
==
S_OK
,
"EnumerateInstalledRuntimes returned %x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
while
((
hr
=
IEnumUnknown_Next
(
runtime_enum
,
1
,
&
unk
,
&
count
))
==
S_OK
)
{
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
&
runtime_info
);
ok
(
hr
==
S_OK
,
"QueryInterface returned %x
\n
"
,
hr
);
count
=
1
;
hr
=
ICLRRuntimeInfo_GetVersionString
(
runtime_info
,
buf
,
&
count
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
),
"GetVersionString returned %x
\n
"
,
hr
);
ok
(
count
>
1
,
"GetVersionString returned count %u
\n
"
,
count
);
count
=
0xdeadbeef
;
hr
=
ICLRRuntimeInfo_GetVersionString
(
runtime_info
,
NULL
,
&
count
);
ok
(
hr
==
S_OK
,
"GetVersionString returned %x
\n
"
,
hr
);
ok
(
count
>
1
&&
count
!=
0xdeadbeef
,
"GetVersionString returned count %u
\n
"
,
count
);
count
=
MAX_PATH
;
hr
=
ICLRRuntimeInfo_GetVersionString
(
runtime_info
,
buf
,
&
count
);
ok
(
hr
==
S_OK
,
"GetVersionString returned %x
\n
"
,
hr
);
ok
(
count
>
1
,
"GetVersionString returned count %u
\n
"
,
count
);
trace
(
"runtime found: %s
\n
"
,
wine_dbgstr_w
(
buf
));
ICLRRuntimeInfo_Release
(
runtime_info
);
IUnknown_Release
(
unk
);
}
ok
(
hr
==
S_FALSE
,
"IEnumUnknown_Next returned %x
\n
"
,
hr
);
IEnumUnknown_Release
(
runtime_enum
);
}
START_TEST
(
metahost
)
{
if
(
!
init_pointers
())
return
;
test_enumruntimes
();
cleanup
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment