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
c2ec3687
Commit
c2ec3687
authored
Mar 10, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed PROCESS_IsCurrent().
parent
ea0d028a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
21 deletions
+4
-21
process.h
include/process.h
+0
-4
virtual.c
memory/virtual.c
+2
-2
process.c
scheduler/process.c
+2
-15
No files found.
include/process.h
View file @
c2ec3687
...
...
@@ -157,7 +157,6 @@ extern void ENV_FreeEnvironment( PDB *pdb );
/* scheduler/process.c */
extern
BOOL
PROCESS_Init
(
BOOL
win32
);
extern
BOOL
PROCESS_IsCurrent
(
HANDLE
handle
);
extern
PDB
*
PROCESS_IdToPDB
(
DWORD
id
);
extern
void
PROCESS_CallUserSignalProc
(
UINT
uCode
,
DWORD
dwThreadId
,
HMODULE
hModule
);
extern
PDB
*
PROCESS_Create
(
struct
_NE_MODULE
*
pModule
,
HFILE
hFile
,
...
...
@@ -168,9 +167,6 @@ extern PDB *PROCESS_Create( struct _NE_MODULE *pModule, HFILE hFile,
extern
void
PROCESS_FreePDB
(
PDB
*
pdb
);
extern
void
PROCESS_WalkProcess
(
void
);
/* scheduler/debugger.c */
extern
DWORD
DEBUG_SendExceptionEvent
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
,
CONTEXT
*
ctx
);
static
inline
PDB
*
WINE_UNUSED
PROCESS_Current
(
void
)
{
return
NtCurrentTeb
()
->
process
;
...
...
memory/virtual.c
View file @
c2ec3687
...
...
@@ -813,7 +813,7 @@ BOOL WINAPI VirtualProtectEx(
DWORD
new_prot
,
/* [in] Desired access protection */
LPDWORD
old_prot
/* [out] Address of variable to get old protection */
)
{
if
(
PROCESS_IsCurrent
(
handle
))
if
(
MapProcessHandle
(
handle
)
==
GetCurrentProcessId
(
))
return
VirtualProtect
(
addr
,
size
,
new_prot
,
old_prot
);
ERR
(
"Unsupported on other process
\n
"
);
return
FALSE
;
...
...
@@ -902,7 +902,7 @@ DWORD WINAPI VirtualQueryEx(
LPMEMORY_BASIC_INFORMATION
info
,
/* [out] Address of info buffer */
DWORD
len
/* [in] Size of buffer */
)
{
if
(
PROCESS_IsCurrent
(
handle
))
if
(
MapProcessHandle
(
handle
)
==
GetCurrentProcessId
(
))
return
VirtualQuery
(
addr
,
info
,
len
);
ERR
(
"Unsupported on other process
\n
"
);
return
0
;
...
...
scheduler/process.c
View file @
c2ec3687
...
...
@@ -63,19 +63,6 @@ void PROCESS_WalkProcess(void)
return
;
}
/***********************************************************************
* PROCESS_IsCurrent
*
* Check if a handle is to the current process
*/
BOOL
PROCESS_IsCurrent
(
HANDLE
handle
)
{
struct
get_process_info_request
*
req
=
get_req_buffer
();
req
->
handle
=
handle
;
return
(
!
server_call
(
REQ_GET_PROCESS_INFO
)
&&
(
req
->
pid
==
PROCESS_Current
()
->
server_pid
));
}
/***********************************************************************
* PROCESS_IdToPDB
...
...
@@ -274,7 +261,7 @@ void PROCESS_FreePDB( PDB *pdb )
ENV_FreeEnvironment
(
pdb
);
while
(
*
pptr
&&
(
*
pptr
!=
pdb
))
pptr
=
&
(
*
pptr
)
->
next
;
if
(
*
pptr
)
*
pptr
=
pdb
->
next
;
HeapFree
(
SystemHeap
,
0
,
pdb
);
HeapFree
(
GetProcessHeap
()
,
0
,
pdb
);
}
...
...
@@ -286,7 +273,7 @@ void PROCESS_FreePDB( PDB *pdb )
*/
static
PDB
*
PROCESS_CreatePDB
(
PDB
*
parent
,
BOOL
inherit
)
{
PDB
*
pdb
=
HeapAlloc
(
SystemHeap
,
HEAP_ZERO_MEMORY
,
sizeof
(
PDB
)
);
PDB
*
pdb
=
HeapAlloc
(
GetProcessHeap
()
,
HEAP_ZERO_MEMORY
,
sizeof
(
PDB
)
);
if
(
!
pdb
)
return
NULL
;
pdb
->
exit_code
=
STILL_ACTIVE
;
...
...
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