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
16e8633e
Commit
16e8633e
authored
Apr 14, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Handle memory reservation errors more gracefully.
parent
f02ef19f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
dosmem.c
dlls/winedos/dosmem.c
+2
-3
winevdm.c
programs/winevdm/winevdm.c
+7
-1
No files found.
dlls/winedos/dosmem.c
View file @
16e8633e
...
...
@@ -506,14 +506,13 @@ BOOL DOSMEM_MapDosLayout(void)
unsigned
short
sel
;
LDT_ENTRY
entry
;
if
(
DOSMEM_dosmem
)
if
(
DOSMEM_dosmem
||
!
VirtualProtect
(
NULL
,
DOSMEM_SIZE
,
PAGE_EXECUTE_READWRITE
,
NULL
)
)
{
ERR
(
"Need
s
access to the first megabyte for DOS mode
\n
"
);
ERR
(
"Need
full
access to the first megabyte for DOS mode
\n
"
);
ExitProcess
(
1
);
}
MESSAGE
(
"Warning: unprotecting memory to allow real-mode calls.
\n
"
" NULL pointer accesses will no longer be caught.
\n
"
);
VirtualProtect
(
NULL
,
DOSMEM_SIZE
,
PAGE_EXECUTE_READWRITE
,
NULL
);
/* copy the BIOS and ISR area down */
memcpy
(
DOSMEM_dosmem
,
DOSMEM_sysmem
,
0x400
+
0x100
);
DOSMEM_sysmem
=
DOSMEM_dosmem
;
...
...
programs/winevdm/winevdm.c
View file @
16e8633e
...
...
@@ -383,6 +383,7 @@ int main( int argc, char *argv[] )
char
*
cmdline
,
*
appname
,
**
first_arg
;
char
*
p
;
HMODULE
winedos
;
MEMORY_BASIC_INFORMATION
mem_info
;
if
(
!
argv
[
1
])
usage
();
...
...
@@ -405,7 +406,12 @@ int main( int argc, char *argv[] )
if
(
!
(
winedos
=
LoadLibraryA
(
"winedos.dll"
))
||
!
(
wine_load_dos_exe
=
(
void
*
)
GetProcAddress
(
winedos
,
"wine_load_dos_exe"
)))
{
WINE_MESSAGE
(
"winevdm: unable to exec '%s': 16-bit support missing
\n
"
,
argv
[
1
]
);
WINE_MESSAGE
(
"winevdm: unable to exec '%s': DOS support unavailable
\n
"
,
appname
);
ExitProcess
(
1
);
}
if
(
!
VirtualQuery
(
NULL
,
&
mem_info
,
sizeof
(
mem_info
)
)
||
mem_info
.
State
==
MEM_FREE
)
{
WINE_MESSAGE
(
"winevdm: unable to exec '%s': DOS memory range unavailable
\n
"
,
appname
);
ExitProcess
(
1
);
}
...
...
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