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
16b44116
Commit
16b44116
authored
Nov 25, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed MODULE_GetLoadOrderA.
parent
c762f5d7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
44 deletions
+19
-44
ne_module.c
dlls/kernel/ne_module.c
+4
-1
process.c
dlls/kernel/process.c
+2
-2
loader.c
dlls/ntdll/loader.c
+1
-1
loadorder.c
dlls/ntdll/loadorder.c
+10
-35
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-2
module.h
include/module.h
+1
-3
No files found.
dlls/kernel/ne_module.c
View file @
16b44116
...
@@ -1212,6 +1212,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
...
@@ -1212,6 +1212,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
}
}
else
else
{
{
UNICODE_STRING
pathW
;
WCHAR
buffer
[
MAX_PATH
],
*
p
;
WCHAR
buffer
[
MAX_PATH
],
*
p
;
if
(
!
GetModuleFileNameW
(
0
,
buffer
,
MAX_PATH
))
p
=
NULL
;
if
(
!
GetModuleFileNameW
(
0
,
buffer
,
MAX_PATH
))
p
=
NULL
;
...
@@ -1220,7 +1221,9 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
...
@@ -1220,7 +1221,9 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
if
((
p
=
strrchrW
(
buffer
,
'\\'
)))
p
++
;
if
((
p
=
strrchrW
(
buffer
,
'\\'
)))
p
++
;
else
p
=
buffer
;
else
p
=
buffer
;
}
}
MODULE_GetLoadOrderA
(
loadorder
,
p
,
basename
,
FALSE
);
RtlCreateUnicodeStringFromAsciiz
(
&
pathW
,
basename
);
MODULE_GetLoadOrderW
(
loadorder
,
p
,
pathW
.
Buffer
);
RtlFreeUnicodeString
(
&
pathW
);
}
}
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
...
...
dlls/kernel/process.c
View file @
16b44116
...
@@ -182,7 +182,7 @@ static HANDLE open_exe_file( const WCHAR *name )
...
@@ -182,7 +182,7 @@ static HANDLE open_exe_file( const WCHAR *name )
name
=
buffer
;
name
=
buffer
;
}
}
MODULE_GetLoadOrderW
(
loadorder
,
NULL
,
name
,
TRUE
);
MODULE_GetLoadOrderW
(
loadorder
,
NULL
,
name
);
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
{
{
...
@@ -245,7 +245,7 @@ static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE
...
@@ -245,7 +245,7 @@ static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE
return
FALSE
;
return
FALSE
;
}
}
MODULE_GetLoadOrderW
(
loadorder
,
NULL
,
buffer
,
TRUE
);
MODULE_GetLoadOrderW
(
loadorder
,
NULL
,
buffer
);
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
{
{
...
...
dlls/ntdll/loader.c
View file @
16b44116
...
@@ -1442,7 +1442,7 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_
...
@@ -1442,7 +1442,7 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_
}
}
main_exe
=
get_modref
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
main_exe
=
get_modref
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
MODULE_GetLoadOrderW
(
loadorder
,
main_exe
->
ldr
.
BaseDllName
.
Buffer
,
filename
,
TRUE
);
MODULE_GetLoadOrderW
(
loadorder
,
main_exe
->
ldr
.
BaseDllName
.
Buffer
,
filename
);
nts
=
STATUS_DLL_NOT_FOUND
;
nts
=
STATUS_DLL_NOT_FOUND
;
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
for
(
i
=
0
;
i
<
LOADORDER_NTYPES
;
i
++
)
...
...
dlls/ntdll/loadorder.c
View file @
16b44116
...
@@ -510,7 +510,7 @@ BOOL MODULE_GetSystemDirectory( UNICODE_STRING *sysdir )
...
@@ -510,7 +510,7 @@ BOOL MODULE_GetSystemDirectory( UNICODE_STRING *sysdir )
* the specific dll. Otherwise the default load order is returned.
* the specific dll. Otherwise the default load order is returned.
*/
*/
void
MODULE_GetLoadOrderW
(
enum
loadorder_type
loadorder
[],
const
WCHAR
*
app_name
,
void
MODULE_GetLoadOrderW
(
enum
loadorder_type
loadorder
[],
const
WCHAR
*
app_name
,
const
WCHAR
*
path
,
BOOL
win32
)
const
WCHAR
*
path
)
{
{
static
const
WCHAR
DllOverridesW
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
static
const
WCHAR
DllOverridesW
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
...
@@ -520,8 +520,11 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
...
@@ -520,8 +520,11 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
'D'
,
'l'
,
'l'
,
'O'
,
'v'
,
'e'
,
'r'
,
'r'
,
'i'
,
'd'
,
'e'
,
's'
,
0
};
'D'
,
'l'
,
'l'
,
'O'
,
'v'
,
'e'
,
'r'
,
'r'
,
'i'
,
'd'
,
'e'
,
's'
,
0
};
static
HKEY
std_key
=
(
HKEY
)
-
1
;
/* key to standard section, cached */
static
HKEY
std_key
=
(
HKEY
)
-
1
;
/* key to standard section, cached */
static
UNICODE_STRING
sysdir
;
HKEY
app_key
=
0
;
HKEY
app_key
=
0
;
WCHAR
*
module
,
*
basename
;
WCHAR
*
module
,
*
basename
;
UNICODE_STRING
path_str
;
int
len
;
int
len
;
if
(
!
init_done
)
init_load_order
();
if
(
!
init_done
)
init_load_order
();
...
@@ -531,21 +534,14 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
...
@@ -531,21 +534,14 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
loadorder
[
0
]
=
LOADORDER_INVALID
;
/* in case something bad happens below */
loadorder
[
0
]
=
LOADORDER_INVALID
;
/* in case something bad happens below */
/* Strip path information if the module resides in the system directory
/* Strip path information if the module resides in the system directory
* (path is already stripped by caller for 16-bit modules)
*/
*/
if
(
win32
)
if
(
!
sysdir
.
Buffer
&&
!
MODULE_GetSystemDirectory
(
&
sysdir
))
return
;
RtlInitUnicodeString
(
&
path_str
,
path
);
if
(
RtlPrefixUnicodeString
(
&
sysdir
,
&
path_str
,
TRUE
))
{
{
UNICODE_STRING
path_str
,
sysdir
;
const
WCHAR
*
p
=
path
+
sysdir
.
Length
/
sizeof
(
WCHAR
);
while
(
*
p
==
'\\'
||
*
p
==
'/'
)
p
++
;
if
(
!
MODULE_GetSystemDirectory
(
&
sysdir
))
return
;
if
(
!
strchrW
(
p
,
'\\'
)
&&
!
strchrW
(
p
,
'/'
))
path
=
p
;
RtlInitUnicodeString
(
&
path_str
,
path
);
if
(
RtlPrefixUnicodeString
(
&
sysdir
,
&
path_str
,
TRUE
))
{
const
WCHAR
*
p
=
path
+
sysdir
.
Length
/
sizeof
(
WCHAR
);
while
(
*
p
==
'\\'
||
*
p
==
'/'
)
p
++
;
if
(
!
strchrW
(
p
,
'\\'
)
&&
!
strchrW
(
p
,
'/'
))
path
=
p
;
}
RtlFreeUnicodeString
(
&
sysdir
);
}
}
if
(
!
(
len
=
strlenW
(
path
)))
return
;
if
(
!
(
len
=
strlenW
(
path
)))
return
;
...
@@ -660,24 +656,3 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
...
@@ -660,24 +656,3 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
if
(
app_key
)
NtClose
(
app_key
);
if
(
app_key
)
NtClose
(
app_key
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
module
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
module
);
}
}
/***************************************************************************
* MODULE_GetLoadOrderA (internal)
*
* Locate the loadorder of a module.
* Any path is stripped from the path-argument and so are the extension
* '.dll' and '.exe'. A lookup in the table can yield an override for
* the specific dll. Otherwise the default load order is returned.
*
* FIXME: should be removed, everything should be Unicode.
*/
void
MODULE_GetLoadOrderA
(
enum
loadorder_type
loadorder
[],
const
WCHAR
*
app_name
,
const
char
*
path
,
BOOL
win32
)
{
UNICODE_STRING
pathW
;
RtlCreateUnicodeStringFromAsciiz
(
&
pathW
,
path
);
MODULE_GetLoadOrderW
(
loadorder
,
app_name
,
pathW
.
Buffer
,
win32
);
RtlFreeUnicodeString
(
&
pathW
);
}
dlls/ntdll/ntdll.spec
View file @
16b44116
...
@@ -1080,7 +1080,6 @@
...
@@ -1080,7 +1080,6 @@
#
#
@ cdecl CDROM_InitRegistry(long long str)
@ cdecl CDROM_InitRegistry(long long str)
@ cdecl MODULE_DllThreadAttach(ptr)
@ cdecl MODULE_DllThreadAttach(ptr)
@ cdecl MODULE_GetLoadOrderA(ptr str str long)
@ cdecl MODULE_GetLoadOrderW(ptr wstr wstr)
@ cdecl MODULE_GetLoadOrderW(ptr wstr wstr long)
@ cdecl VERSION_Init(wstr)
@ cdecl VERSION_Init(wstr)
@ cdecl VIRTUAL_SetFaultHandler(ptr ptr ptr)
@ cdecl VIRTUAL_SetFaultHandler(ptr ptr ptr)
include/module.h
View file @
16b44116
...
@@ -184,8 +184,6 @@ extern void TASK_InstallTHHook( THHOOK *pNewThook );
...
@@ -184,8 +184,6 @@ extern void TASK_InstallTHHook( THHOOK *pNewThook );
/* loadorder.c */
/* loadorder.c */
extern
void
MODULE_GetLoadOrderW
(
enum
loadorder_type
plo
[],
const
WCHAR
*
app_name
,
extern
void
MODULE_GetLoadOrderW
(
enum
loadorder_type
plo
[],
const
WCHAR
*
app_name
,
const
WCHAR
*
path
,
BOOL
win32
);
const
WCHAR
*
path
);
extern
void
MODULE_GetLoadOrderA
(
enum
loadorder_type
plo
[],
const
WCHAR
*
app_name
,
const
char
*
path
,
BOOL
win32
);
#endif
/* __WINE_MODULE_H */
#endif
/* __WINE_MODULE_H */
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