Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9ea1d13d
Commit
9ea1d13d
authored
Aug 26, 2010
by
Louis Lenders
Committed by
Alexandre Julliard
Aug 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Improve GetRequestedRuntimeInfo.
parent
830867a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
mscoree_main.c
dlls/mscoree/mscoree_main.c
+30
-2
mscoree.c
dlls/mscoree/tests/mscoree.c
+4
-4
No files found.
dlls/mscoree/mscoree_main.c
View file @
9ea1d13d
...
...
@@ -32,6 +32,7 @@
#include "initguid.h"
#include "cor.h"
#include "corerror.h"
#include "mscoree.h"
#include "mscoree_private.h"
...
...
@@ -414,10 +415,37 @@ HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWST
DWORD
startupFlags
,
DWORD
runtimeInfoFlags
,
LPWSTR
pDirectory
,
DWORD
dwDirectory
,
DWORD
*
dwDirectoryLength
,
LPWSTR
pVersion
,
DWORD
cchBuffer
,
DWORD
*
dwlength
)
{
FIXME
(
"(%s, %s, %s, 0x%08x, 0x%08x, %p, 0x%08x, %p, %p, 0x%08x, %p) stub
\n
"
,
debugstr_w
(
pExe
),
HRESULT
ret
;
DWORD
ver_len
,
dir_len
;
WCHAR
dirW
[
MAX_PATH
],
verW
[
MAX_PATH
];
FIXME
(
"(%s, %s, %s, 0x%08x, 0x%08x, %p, 0x%08x, %p, %p, 0x%08x, %p) semi-stub
\n
"
,
debugstr_w
(
pExe
),
debugstr_w
(
pwszVersion
),
debugstr_w
(
pConfigurationFile
),
startupFlags
,
runtimeInfoFlags
,
pDirectory
,
dwDirectory
,
dwDirectoryLength
,
pVersion
,
cchBuffer
,
dwlength
);
return
GetCORVersion
(
pVersion
,
cchBuffer
,
dwlength
);
if
(
!
pwszVersion
&&
!
(
runtimeInfoFlags
&
RUNTIME_INFO_UPGRADE_VERSION
))
return
CLR_E_SHIM_RUNTIME
;
ret
=
GetCORSystemDirectory
(
dirW
,
dwDirectory
,
&
dir_len
);
if
(
ret
==
S_OK
)
{
if
(
dwDirectoryLength
)
*
dwDirectoryLength
=
dir_len
;
if
(
pDirectory
)
lstrcpyW
(
pDirectory
,
dirW
);
ret
=
GetCORVersion
(
verW
,
cchBuffer
,
&
ver_len
);
if
(
ret
==
S_OK
)
{
if
(
dwlength
)
*
dwlength
=
ver_len
;
if
(
pVersion
)
lstrcpyW
(
pVersion
,
verW
);
}
}
return
ret
;
}
HRESULT
WINAPI
LoadLibraryShim
(
LPCWSTR
szDllName
,
LPCWSTR
szVersion
,
LPVOID
pvReserved
,
HMODULE
*
phModDll
)
...
...
dlls/mscoree/tests/mscoree.c
View file @
9ea1d13d
...
...
@@ -103,13 +103,13 @@ static void test_versioninfo(void)
trace
(
" installed in directory %s is .net version %s
\n
"
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
version
));
/* version number NULL not allowed without RUNTIME_INFO_UPGRADE_VERSION flag */
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
NULL
,
NULL
,
0
,
0
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
&
size
);
todo_wine
ok
(
hr
==
CLR_E_SHIM_RUNTIME
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
ok
(
hr
==
CLR_E_SHIM_RUNTIME
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
/* with RUNTIME_INFO_UPGRADE_VERSION flag and version number NULL, latest installed version is returned */
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
NULL
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
&
size
);
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
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
),
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_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
));
...
...
@@ -119,8 +119,8 @@ static void test_versioninfo(void)
/* With NULL-pointer for bufferlength, the buffer itsself still gets filled with correct string */
memset
(
version
,
0
,
sizeof
(
version
));
hr
=
pGetRequestedRuntimeInfo
(
NULL
,
v2_0
,
NULL
,
0
,
0
,
path
,
MAX_PATH
,
&
path_len
,
version
,
MAX_PATH
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
todo_wine
ok
(
!
lstrcmpW
(
version
,
v2_0
),
"version is %s , expected %s
\n
"
,
wine_dbgstr_w
(
version
),
wine_dbgstr_w
(
v2_0
));
ok
(
hr
==
S_OK
,
"GetRequestedRuntimeInfo returned %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
version
,
v2_0
),
"version is %s , expected %s
\n
"
,
wine_dbgstr_w
(
version
),
wine_dbgstr_w
(
v2_0
));
}
START_TEST
(
mscoree
)
...
...
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