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
2d6e914b
Commit
2d6e914b
authored
Jan 03, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imagehlp: Make use of the bReadOnly parameter in MapAndLoad.
parent
4950d3de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
access.c
dlls/imagehlp/access.c
+7
-3
No files found.
dlls/imagehlp/access.c
View file @
2d6e914b
...
...
@@ -164,7 +164,9 @@ BOOL WINAPI MapAndLoad(LPSTR pszImageName, LPSTR pszDllPath, PLOADED_IMAGE pLoad
goto
Error
;
}
hFile
=
CreateFileA
(
szFileName
,
GENERIC_READ
,
FILE_SHARE_READ
,
hFile
=
CreateFileA
(
szFileName
,
GENERIC_READ
|
(
bReadOnly
?
0
:
GENERIC_WRITE
),
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
{
...
...
@@ -172,14 +174,16 @@ BOOL WINAPI MapAndLoad(LPSTR pszImageName, LPSTR pszDllPath, PLOADED_IMAGE pLoad
goto
Error
;
}
hFileMapping
=
CreateFileMappingA
(
hFile
,
NULL
,
PAGE_READONLY
|
SEC_COMMIT
,
0
,
0
,
NULL
);
hFileMapping
=
CreateFileMappingA
(
hFile
,
NULL
,
(
bReadOnly
?
PAGE_READONLY
:
PAGE_READWRITE
)
|
SEC_COMMIT
,
0
,
0
,
NULL
);
if
(
!
hFileMapping
)
{
WARN
(
"CreateFileMapping: Error = %d
\n
"
,
GetLastError
());
goto
Error
;
}
mapping
=
MapViewOfFile
(
hFileMapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
mapping
=
MapViewOfFile
(
hFileMapping
,
bReadOnly
?
FILE_MAP_READ
:
FILE_MAP_WRITE
,
0
,
0
,
0
);
CloseHandle
(
hFileMapping
);
if
(
!
mapping
)
{
...
...
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