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
d523e4db
Commit
d523e4db
authored
Jun 07, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Jun 07, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consult ne.operating_system field for NE files in GetBinaryType().
parent
791c84c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
module.c
loader/module.c
+19
-6
No files found.
loader/module.c
View file @
d523e4db
...
...
@@ -538,7 +538,7 @@ WINE_MODREF *MODULE_FindModule(
* SCS_WOW_BINARY: A Win16 based application
* SCS_PIF_BINARY: A PIF file that executes an MS-Dos based app
* SCS_POSIX_BINARY: A POSIX based application ( Not implemented )
* SCS_OS216_BINARY: A 16bit OS/2 based application
( Not implemented )
* SCS_OS216_BINARY: A 16bit OS/2 based application
*
* Returns TRUE if the file is an executable in which case
* the value pointed by lpBinaryType is set.
...
...
@@ -614,12 +614,25 @@ static BOOL MODULE_GetBinaryType( HFILE hfile, OFSTRUCT *ofs,
{
/* The IMAGE_OS2_SIGNATURE indicates that the
* "extended header is a Windows executable (NE)
* header. This is a bit misleading, but it is
* documented in the SDK. ( for more details see
* the neexe.h file )
* header." This can mean either a 16-bit OS/2
* or a 16-bit Windows or even a DOS program
* (running under a DOS extender). To decide
* which, we'll have to read the NE header.
*/
*
lpBinaryType
=
SCS_WOW_BINARY
;
return
TRUE
;
IMAGE_OS2_HEADER
ne
;
if
(
_llseek
(
hfile
,
mz_header
.
e_lfanew
,
SEEK_SET
)
>=
0
&&
_lread
(
hfile
,
&
ne
,
sizeof
(
ne
)
)
==
sizeof
(
ne
)
)
{
switch
(
ne
.
operating_system
)
{
case
2
:
*
lpBinaryType
=
SCS_WOW_BINARY
;
return
TRUE
;
case
5
:
*
lpBinaryType
=
SCS_DOS_BINARY
;
return
TRUE
;
default
:
*
lpBinaryType
=
SCS_OS216_BINARY
;
return
TRUE
;
}
}
/* Couldn't read header, so abort. */
return
FALSE
;
}
else
{
...
...
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