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
4654c321
Commit
4654c321
authored
Feb 20, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Feb 20, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
It seems to be GetModuleFileName16 that checks exe version on whether
to return long or short paths, not GetModuleFileNameA.
parent
ec7d7fa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
module.c
loader/module.c
+6
-4
module.c
loader/ne/module.c
+6
-1
No files found.
loader/module.c
View file @
4654c321
...
...
@@ -1296,6 +1296,11 @@ HMODULE WINAPI GetModuleHandleW(LPCWSTR module)
/***********************************************************************
* GetModuleFileNameA (KERNEL32.235)
*
* GetModuleFileNameA seems to *always* return the long path;
* it's only GetModuleFileName16 that decides between short/long path
* by checking if exe version >= 4.0.
* (SDK docu doesn't mention this)
*/
DWORD
WINAPI
GetModuleFileNameA
(
HMODULE
hModule
,
/* [in] module handle (32bit) */
...
...
@@ -1307,10 +1312,7 @@ DWORD WINAPI GetModuleFileNameA(
if
(
!
wm
)
/* can happen on start up or the like */
return
0
;
if
(
PE_HEADER
(
wm
->
module
)
->
OptionalHeader
.
MajorOperatingSystemVersion
>=
4
.
0
)
lstrcpynA
(
lpFileName
,
wm
->
filename
,
size
);
else
lstrcpynA
(
lpFileName
,
wm
->
short_filename
,
size
);
lstrcpynA
(
lpFileName
,
wm
->
filename
,
size
);
TRACE
(
"%s
\n
"
,
lpFileName
);
return
strlen
(
lpFileName
);
...
...
loader/ne/module.c
View file @
4654c321
...
...
@@ -1388,6 +1388,8 @@ WORD WINAPI GetExpWinVer16( HMODULE16 hModule )
/**********************************************************************
* GetModuleFileName16 (KERNEL.49)
*
* Comment: see GetModuleFileNameA
*/
INT16
WINAPI
GetModuleFileName16
(
HINSTANCE16
hModule
,
LPSTR
lpFileName
,
INT16
nSize
)
...
...
@@ -1396,7 +1398,10 @@ INT16 WINAPI GetModuleFileName16( HINSTANCE16 hModule, LPSTR lpFileName,
if
(
!
hModule
)
hModule
=
GetCurrentTask
();
if
(
!
(
pModule
=
NE_GetPtr
(
hModule
)))
return
0
;
lstrcpynA
(
lpFileName
,
NE_MODULE_NAME
(
pModule
),
nSize
);
if
(
pModule
->
expected_version
>=
0x400
)
GetLongPathNameA
(
NE_MODULE_NAME
(
pModule
),
lpFileName
,
nSize
);
else
lstrcpynA
(
lpFileName
,
NE_MODULE_NAME
(
pModule
),
nSize
);
TRACE
(
"%s
\n
"
,
lpFileName
);
return
strlen
(
lpFileName
);
}
...
...
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