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
d235b137
Commit
d235b137
authored
Oct 11, 1998
by
Alexander Larsson
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetModuleFileName32A() returns long filename if app sets osversion >=
4.0. Also moved the long filename hackery to GetLongPathName32A() so it can be used by win32 programs.
parent
c1190fe2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
module.c
loader/module.c
+5
-12
No files found.
loader/module.c
View file @
d235b137
...
...
@@ -256,7 +256,7 @@ HMODULE32 MODULE_FindModule32(
LPSTR
xlname
,
xdotptr
;
assert
(
wm
->
longname
);
xlname
=
strrchr
(
wm
->
longname
,
'
/
'
);
xlname
=
strrchr
(
wm
->
longname
,
'
\\
'
);
if
(
!
xlname
)
xlname
=
wm
->
longname
;
else
...
...
@@ -636,21 +636,14 @@ DWORD WINAPI GetModuleFileName32A(
DWORD
size
/* [in] size of filenamebuffer */
)
{
WINE_MODREF
*
wm
=
MODULE32_LookupHMODULE
(
PROCESS_Current
(),
hModule
);
char
*
p
;
if
(
!
wm
)
/* can happen on start up or the like */
return
0
;
/* FIXME: we should probably get a real long name, but wm->longname
* is currently a UNIX filename!
* Use the module name to at least get the long version of the filename.
*/
lstrcpyn32A
(
lpFileName
,
wm
->
shortname
,
size
);
if
(
(
p
=
strrchr
(
lpFileName
,
'\\'
))
)
{
p
++
;
size
-=
(
p
-
lpFileName
);
lstrcpyn32A
(
p
,
wm
->
modname
,
size
);
}
if
(
PE_HEADER
(
wm
->
module
)
->
OptionalHeader
.
MajorOperatingSystemVersion
>=
4
.
0
)
lstrcpyn32A
(
lpFileName
,
wm
->
longname
,
size
);
else
lstrcpyn32A
(
lpFileName
,
wm
->
shortname
,
size
);
TRACE
(
module
,
"%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