Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
f67d34f7
Commit
f67d34f7
authored
13 years ago
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mscoree: Better support RUNTIME_INFO_UPGRADE_VERSION in GetRequestedRuntimeInfo.
parent
10cd34db
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/mscoree/metahost.c
+21
-3
21 additions, 3 deletions
dlls/mscoree/metahost.c
dlls/mscoree/tests/mscoree.c
+37
-0
37 additions, 0 deletions
dlls/mscoree/tests/mscoree.c
with
58 additions
and
3 deletions
dlls/mscoree/metahost.c
+
21
−
3
View file @
f67d34f7
...
...
@@ -1310,11 +1310,21 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
if
(
version
)
{
return
CLRMetaHost_GetRuntime
(
0
,
version
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
result
);
hr
=
CLRMetaHost_GetRuntime
(
0
,
version
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
result
);
if
(
SUCCEEDED
(
hr
))
return
hr
;
}
if
(
runtimeinfo_flags
&
RUNTIME_INFO_UPGRADE_VERSION
)
{
DWORD
major
,
minor
,
build
;
if
(
version
&&
!
parse_runtime_version
(
version
,
&
major
,
&
minor
,
&
build
))
{
ERR
(
"Cannot parse %s
\n
"
,
debugstr_w
(
version
));
return
CLR_E_SHIM_RUNTIME
;
}
find_runtimes
();
if
(
legacy
)
...
...
@@ -1325,8 +1335,16 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
while
(
i
--
)
{
if
(
runtimes
[
i
].
mono_abi_version
)
return
ICLRRuntimeInfo_QueryInterface
(
&
runtimes
[
i
].
ICLRRuntimeInfo_iface
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
result
);
{
/* Must be greater or equal to the version passed in. */
if
(
!
version
||
((
runtimes
[
i
].
major
>=
major
&&
runtimes
[
i
].
minor
>=
minor
&&
runtimes
[
i
].
build
>=
build
)
||
(
runtimes
[
i
].
major
>=
major
&&
runtimes
[
i
].
minor
>
minor
)
||
(
runtimes
[
i
].
major
>
major
)))
{
return
ICLRRuntimeInfo_QueryInterface
(
&
runtimes
[
i
].
ICLRRuntimeInfo_iface
,
&
IID_ICLRRuntimeInfo
,
(
void
**
)
result
);
}
}
}
if
(
legacy
)
...
...
This diff is collapsed.
Click to expand it.
dlls/mscoree/tests/mscoree.c
+
37
−
0
View file @
f67d34f7
...
...
@@ -60,8 +60,11 @@ static BOOL init_functionpointers(void)
static
void
test_versioninfo
(
void
)
{
const
WCHAR
v9_0
[]
=
{
'v'
,
'9'
,
'.'
,
'0'
,
'.'
,
'3'
,
'0'
,
'3'
,
'1'
,
'9'
,
0
};
const
WCHAR
v2_0
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'5'
,
'0'
,
'7'
,
'2'
,
'7'
,
0
};
const
WCHAR
v2_0_0
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'0'
,
0
};
const
WCHAR
v1_1
[]
=
{
'v'
,
'1'
,
'.'
,
'1'
,
'.'
,
'4'
,
'3'
,
'2'
,
'2'
,
0
};
const
WCHAR
v1_1_0
[]
=
{
'v'
,
'1'
,
'.'
,
'1'
,
'.'
,
'0'
,
0
};
WCHAR
version
[
MAX_PATH
];
WCHAR
path
[
MAX_PATH
];
...
...
@@ -143,6 +146,40 @@ static void test_versioninfo(void)
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v2_0
,
NULL
,
0
,
0
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
S_OK
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
ok
(
!
winetest_strcmpW
(
version
,
v2_0
),
"version is %s , expected %s
\n
"
,
wine_dbgstr_w
(
version
),
wine_dbgstr_w
(
v2_0
));
/* Invalid Version and RUNTIME_INFO_UPGRADE_VERSION flag*/
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v1_1
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
S_OK
||
hr
==
CLR_E_SHIM_RUNTIME
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
/* .NET 1.1 may not be installed. */
ok
(
!
winetest_strcmpW
(
version
,
v1_1
)
||
!
winetest_strcmpW
(
version
,
v2_0
),
"version is %s , expected %s or %s
\n
"
,
wine_dbgstr_w
(
version
),
wine_dbgstr_w
(
v1_1
),
wine_dbgstr_w
(
v2_0
));
}
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v9_0
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
CLR_E_SHIM_RUNTIME
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v1_1_0
,
NULL
,
0
,
0
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
CLR_E_SHIM_RUNTIME
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v1_1_0
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
S_OK
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
ok
(
!
winetest_strcmpW
(
version
,
v2_0
),
"version is %s , expected %s
\n
"
,
wine_dbgstr_w
(
version
),
wine_dbgstr_w
(
v2_0
));
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v2_0_0
,
NULL
,
0
,
0
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
CLR_E_SHIM_RUNTIME
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v2_0_0
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
ok
(
hr
==
S_OK
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
ok
(
!
winetest_strcmpW
(
version
,
v2_0
),
"version is %s , expected %s
\n
"
,
wine_dbgstr_w
(
version
),
wine_dbgstr_w
(
v2_0
));
}
static
void
test_loadlibraryshim
(
void
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment