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
5bb74648
Commit
5bb74648
authored
Sep 16, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Sep 16, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added VirtualAllocEx.
parent
ecdde389
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
kernel32.spec
dlls/kernel/kernel32.spec
+1
-1
virtual.c
memory/virtual.c
+22
-1
No files found.
dlls/kernel/kernel32.spec
View file @
5bb74648
...
...
@@ -915,7 +915,7 @@ import ntdll.dll
896 stub SwitchToFiber
897 stub SwitchToThread
898 stdcall TryEnterCriticalSection(ptr) TryEnterCriticalSection
899 st
ub
VirtualAllocEx
899 st
dcall VirtualAllocEx(long ptr long long long)
VirtualAllocEx
900 stub VirtualFreeEx
901 stub WriteFileGather
...
...
memory/virtual.c
View file @
5bb74648
...
...
@@ -700,11 +700,12 @@ LPVOID WINAPI VirtualAlloc(
WARN
(
"MEM_TOP_DOWN ignored
\n
"
);
type
&=
~
MEM_TOP_DOWN
;
}
/* Compute the
protection
flags */
/* Compute the
alloc type
flags */
if
(
!
(
type
&
(
MEM_COMMIT
|
MEM_RESERVE
|
MEM_SYSTEM
))
||
(
type
&
~
(
MEM_COMMIT
|
MEM_RESERVE
|
MEM_SYSTEM
)))
{
ERR
(
"called with wrong alloc type flags (%08lx) !
\n
"
,
type
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
...
...
@@ -775,6 +776,25 @@ LPVOID WINAPI VirtualAlloc(
/***********************************************************************
* VirtualAllocEx (KERNEL32.548)
*
* Seems to be just as VirtualAlloc, but with process handle.
*/
LPVOID
WINAPI
VirtualAllocEx
(
HANDLE
hProcess
,
/* [in] Handle of process to do mem operation */
LPVOID
addr
,
/* [in] Address of region to reserve or commit */
DWORD
size
,
/* [in] Size of region */
DWORD
type
,
/* [in] Type of allocation */
DWORD
protect
/* [in] Type of access protection */
)
{
if
(
MapProcessHandle
(
hProcess
)
==
GetCurrentProcessId
())
return
VirtualAlloc
(
addr
,
size
,
type
,
protect
);
ERR
(
"Unsupported on other process
\n
"
);
return
NULL
;
}
/***********************************************************************
* VirtualFree (KERNEL32.550)
* Release or decommits a region of pages in virtual address space.
*
...
...
@@ -809,6 +829,7 @@ BOOL WINAPI VirtualFree(
if
((
type
!=
MEM_DECOMMIT
)
&&
(
type
!=
MEM_RELEASE
))
{
ERR
(
"called with wrong free type flags (%08lx) !
\n
"
,
type
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
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