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
84ef0fca
Commit
84ef0fca
authored
Oct 01, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Use the new search methods for GetCORVersion/GetCORSystemDirectory.
parent
add7454d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
mscoree_main.c
dlls/mscoree/mscoree_main.c
+21
-29
mscoree.c
dlls/mscoree/tests/mscoree.c
+8
-0
No files found.
dlls/mscoree/mscoree_main.c
View file @
84ef0fca
...
...
@@ -460,56 +460,48 @@ HRESULT WINAPI _CorValidateImage(PVOID* imageBase, LPCWSTR imageName)
HRESULT
WINAPI
GetCORSystemDirectory
(
LPWSTR
pbuffer
,
DWORD
cchBuffer
,
DWORD
*
dwLength
)
{
static
const
WCHAR
slash
[]
=
{
'\\'
,
0
};
WCHAR
system_dir
[
MAX_PATH
];
WCHAR
version
[
MAX_PATH
];
ICLRRuntimeInfo
*
info
;
HRESULT
ret
;
FIXME
(
"(%p, %d, %p): semi-stub
!
\n
"
,
pbuffer
,
cchBuffer
,
dwLength
);
TRACE
(
"(%p, %d, %p)
!
\n
"
,
pbuffer
,
cchBuffer
,
dwLength
);
if
(
!
dwLength
)
if
(
!
dwLength
||
!
pbuffer
)
return
E_POINTER
;
if
(
!
pbuffer
)
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
ret
=
get_runtime_info
(
NULL
,
NULL
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
TRUE
,
&
info
);
if
(
!
get_install_root
(
system_dir
))
{
ERR
(
"error reading registry key for installroot, returning empty path
\n
"
);
*
dwLength
=
0
;
}
else
if
(
SUCCEEDED
(
ret
))
{
GetCORVersion
(
version
,
MAX_PATH
,
dwLength
);
lstrcatW
(
system_dir
,
version
);
lstrcatW
(
system_dir
,
slash
);
*
dwLength
=
lstrlenW
(
system_dir
)
+
1
;
*
dwLength
=
cchBuffer
;
ret
=
ICLRRuntimeInfo_GetRuntimeDirectory
(
info
,
pbuffer
,
dwLength
);
if
(
cchBuffer
<
*
dwLength
)
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
lstrcpyW
(
pbuffer
,
system_dir
);
ICLRRuntimeInfo_Release
(
info
);
}
return
S_OK
;
return
ret
;
}
HRESULT
WINAPI
GetCORVersion
(
LPWSTR
pbuffer
,
DWORD
cchBuffer
,
DWORD
*
dwLength
)
{
static
const
WCHAR
version
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'5'
,
'0'
,
'7'
,
'2'
,
'7'
,
0
};
ICLRRuntimeInfo
*
info
;
HRESULT
ret
;
FIXME
(
"(%p, %d, %p): semi-stub
!
\n
"
,
pbuffer
,
cchBuffer
,
dwLength
);
TRACE
(
"(%p, %d, %p)
!
\n
"
,
pbuffer
,
cchBuffer
,
dwLength
);
if
(
!
dwLength
||
!
pbuffer
)
return
E_POINTER
;
*
dwLength
=
lstrlenW
(
version
)
+
1
;
ret
=
get_runtime_info
(
NULL
,
NULL
,
NULL
,
0
,
RUNTIME_INFO_UPGRADE_VERSION
,
TRUE
,
&
info
)
;
if
(
cchBuffer
<
*
dwLength
)
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
if
(
SUCCEEDED
(
ret
))
{
*
dwLength
=
cchBuffer
;
ret
=
ICLRRuntimeInfo_GetVersionString
(
info
,
pbuffer
,
dwLength
);
lstrcpyW
(
pbuffer
,
version
);
ICLRRuntimeInfo_Release
(
info
);
}
return
S_OK
;
return
ret
;
}
HRESULT
WINAPI
GetRequestedRuntimeInfo
(
LPCWSTR
pExe
,
LPCWSTR
pwszVersion
,
LPCWSTR
pConfigurationFile
,
...
...
dlls/mscoree/tests/mscoree.c
View file @
84ef0fca
...
...
@@ -87,6 +87,14 @@ static void test_versioninfo(void)
}
hr
=
pGetCORVersion
(
version
,
1
,
&
size
);
if
(
hr
==
CLR_E_SHIM_RUNTIME
)
{
/* FIXME: Get Mono packaged properly so we can fail here. */
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
),
"GetCORVersion returned %08x
\n
"
,
hr
);
skip
(
"No .NET runtimes are installed
\n
"
);
return
;
}
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
),
"GetCORVersion returned %08x
\n
"
,
hr
);
hr
=
pGetCORVersion
(
version
,
MAX_PATH
,
&
size
);
...
...
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