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
1682a92d
Commit
1682a92d
authored
Oct 27, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Implement LoadLibraryShim.
parent
85213397
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
6 deletions
+53
-6
metahost.c
dlls/mscoree/metahost.c
+15
-2
mscoree_main.c
dlls/mscoree/mscoree_main.c
+35
-3
mscoree_private.h
dlls/mscoree/mscoree_private.h
+2
-0
mscoree.c
dlls/mscoree/tests/mscoree.c
+1
-1
No files found.
dlls/mscoree/metahost.c
View file @
1682a92d
...
...
@@ -249,9 +249,17 @@ static HRESULT WINAPI CLRRuntimeInfo_LoadErrorString(ICLRRuntimeInfo* iface,
static
HRESULT
WINAPI
CLRRuntimeInfo_LoadLibrary
(
ICLRRuntimeInfo
*
iface
,
LPCWSTR
pwzDllName
,
HMODULE
*
phndModule
)
{
FIXME
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
pwzDllName
),
phndModule
);
WCHAR
version
[
MAX_PATH
];
HRESULT
hr
;
DWORD
cchBuffer
;
return
E_NOTIMPL
;
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
pwzDllName
),
phndModule
);
cchBuffer
=
MAX_PATH
;
hr
=
ICLRRuntimeInfo_GetVersionString
(
iface
,
version
,
&
cchBuffer
);
if
(
FAILED
(
hr
))
return
hr
;
return
LoadLibraryShim
(
pwzDllName
,
version
,
NULL
,
phndModule
);
}
static
HRESULT
WINAPI
CLRRuntimeInfo_GetProcAddress
(
ICLRRuntimeInfo
*
iface
,
...
...
@@ -947,3 +955,8 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
return
CLR_E_SHIM_RUNTIME
;
}
HRESULT
force_get_runtime_info
(
ICLRRuntimeInfo
**
result
)
{
return
IUnknown_QueryInterface
((
IUnknown
*
)
&
runtimes
[
0
],
&
IID_ICLRRuntimeInfo
,
(
void
**
)
result
);
}
dlls/mscoree/mscoree_main.c
View file @
1682a92d
...
...
@@ -549,10 +549,42 @@ HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWST
HRESULT
WINAPI
LoadLibraryShim
(
LPCWSTR
szDllName
,
LPCWSTR
szVersion
,
LPVOID
pvReserved
,
HMODULE
*
phModDll
)
{
FIXME
(
"(%p %s, %p, %p, %p): semi-stub
\n
"
,
szDllName
,
debugstr_w
(
szDllName
),
szVersion
,
pvReserved
,
phModDll
);
HRESULT
ret
=
S_OK
;
WCHAR
dll_filename
[
MAX_PATH
];
WCHAR
version
[
MAX_PATH
];
static
const
WCHAR
default_version
[]
=
{
'v'
,
'1'
,
'.'
,
'1'
,
'.'
,
'4'
,
'3'
,
'2'
,
'2'
,
0
};
static
const
WCHAR
slash
[]
=
{
'\\'
,
0
};
DWORD
dummy
;
if
(
phModDll
)
*
phModDll
=
LoadLibraryW
(
szDllName
);
return
S_OK
;
TRACE
(
"(%p %s, %p, %p, %p)
\n
"
,
szDllName
,
debugstr_w
(
szDllName
),
szVersion
,
pvReserved
,
phModDll
);
if
(
!
szDllName
||
!
phModDll
)
return
E_POINTER
;
if
(
!
get_install_root
(
dll_filename
))
{
ERR
(
"error reading registry key for installroot
\n
"
);
dll_filename
[
0
]
=
0
;
}
else
{
if
(
!
szVersion
)
{
ret
=
GetCORVersion
(
version
,
MAX_PATH
,
&
dummy
);
if
(
SUCCEEDED
(
ret
))
szVersion
=
version
;
else
szVersion
=
default_version
;
}
strcatW
(
dll_filename
,
szVersion
);
strcatW
(
dll_filename
,
slash
);
}
strcatW
(
dll_filename
,
szDllName
);
*
phModDll
=
LoadLibraryW
(
dll_filename
);
return
*
phModDll
?
S_OK
:
E_HANDLE
;
}
HRESULT
WINAPI
LockClrVersion
(
FLockClrVersionCallback
hostCallback
,
FLockClrVersionCallback
*
pBeginHostSetup
,
FLockClrVersionCallback
*
pEndHostSetup
)
...
...
dlls/mscoree/mscoree_private.h
View file @
1682a92d
...
...
@@ -48,6 +48,8 @@ typedef struct CLRRuntimeInfo
extern
HRESULT
get_runtime_info
(
LPCWSTR
exefile
,
LPCWSTR
version
,
LPCWSTR
config_file
,
DWORD
startup_flags
,
DWORD
runtimeinfo_flags
,
BOOL
legacy
,
ICLRRuntimeInfo
**
result
);
extern
HRESULT
force_get_runtime_info
(
ICLRRuntimeInfo
**
result
);
/* Mono 2.6 embedding */
typedef
struct
_MonoDomain
MonoDomain
;
typedef
struct
_MonoAssembly
MonoAssembly
;
...
...
dlls/mscoree/tests/mscoree.c
View file @
1682a92d
...
...
@@ -241,7 +241,7 @@ static void test_loadlibraryshim(void)
}
hr
=
pLoadLibraryShim
(
nosuchdll
,
latest
,
NULL
,
&
hdll
);
todo_wine
ok
(
hr
==
E_HANDLE
,
"LoadLibraryShim failed, hr=%x
\n
"
,
hr
);
ok
(
hr
==
E_HANDLE
,
"LoadLibraryShim failed, hr=%x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
FreeLibrary
(
hdll
);
...
...
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