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
c75aa35b
Commit
c75aa35b
authored
Sep 29, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Use the registry path for COM dlls instead of GetModuleFileName.
This allows to load them with LOAD_LIBRARY_AS_DATAFILE.
parent
0250eab2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
main.c
programs/winetest/main.c
+12
-7
No files found.
programs/winetest/main.c
View file @
c75aa35b
...
...
@@ -570,12 +570,13 @@ static BOOL get_main_clsid(const char *name, CLSID *clsid)
return
FALSE
;
}
static
HMODULE
load_com_dll
(
const
char
*
name
)
static
HMODULE
load_com_dll
(
const
char
*
name
,
char
**
path
,
char
*
filename
)
{
HMODULE
dll
=
NULL
;
HKEY
hkey
;
char
keyname
[
100
];
char
dllname
[
MAX_PATH
];
char
*
p
;
CLSID
clsid
;
if
(
!
get_main_clsid
(
name
,
&
clsid
))
return
NULL
;
...
...
@@ -589,7 +590,15 @@ static HMODULE load_com_dll(const char *name)
{
LONG
size
=
sizeof
(
dllname
);
if
(
RegQueryValueA
(
hkey
,
NULL
,
dllname
,
&
size
)
==
ERROR_SUCCESS
)
dll
=
LoadLibraryA
(
dllname
);
{
if
((
dll
=
LoadLibraryExA
(
dllname
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
)))
{
strcpy
(
filename
,
dllname
);
p
=
strrchr
(
dllname
,
'\\'
);
if
(
p
)
*
p
=
0
;
*
path
=
heap_strdup
(
dllname
);
}
}
RegCloseKey
(
hkey
);
}
...
...
@@ -628,11 +637,7 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
strcpy
(
filename
,
dllname
);
dll
=
LoadLibraryExA
(
dllname
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
if
(
!
dll
)
{
dll
=
load_com_dll
(
dllname
);
if
(
dll
)
get_dll_path
(
dll
,
&
wine_tests
[
nr_of_files
].
maindllpath
,
filename
);
}
if
(
!
dll
)
dll
=
load_com_dll
(
dllname
,
&
wine_tests
[
nr_of_files
].
maindllpath
,
filename
);
if
(
!
dll
&&
pLoadLibraryShim
)
{
...
...
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