Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c51ca178
Commit
c51ca178
authored
Sep 14, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Sep 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use NULL attributes if name and SA are not not specified.
parent
364d69d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
virtual.c
dlls/kernel32/virtual.c
+21
-17
No files found.
dlls/kernel32/virtual.c
View file @
c51ca178
...
...
@@ -338,26 +338,10 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
static
const
int
sec_flags
=
SEC_FILE
|
SEC_IMAGE
|
SEC_RESERVE
|
SEC_COMMIT
|
SEC_NOCACHE
;
HANDLE
ret
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
NTSTATUS
status
;
DWORD
access
,
sec_type
;
LARGE_INTEGER
size
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
name
)
{
RtlInitUnicodeString
(
&
nameW
,
name
);
attr
.
ObjectName
=
&
nameW
;
attr
.
RootDirectory
=
get_BaseNamedObjects_handle
();
}
sec_type
=
protect
&
sec_flags
;
protect
&=
~
sec_flags
;
if
(
!
sec_type
)
sec_type
=
SEC_COMMIT
;
...
...
@@ -402,7 +386,27 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
size
.
u
.
LowPart
=
size_low
;
size
.
u
.
HighPart
=
size_high
;
status
=
NtCreateSection
(
&
ret
,
access
,
&
attr
,
&
size
,
protect
,
sec_type
,
hFile
);
if
(
sa
||
name
)
{
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
name
)
{
RtlInitUnicodeString
(
&
nameW
,
name
);
attr
.
ObjectName
=
&
nameW
;
attr
.
RootDirectory
=
get_BaseNamedObjects_handle
();
}
status
=
NtCreateSection
(
&
ret
,
access
,
&
attr
,
&
size
,
protect
,
sec_type
,
hFile
);
}
else
status
=
NtCreateSection
(
&
ret
,
access
,
NULL
,
&
size
,
protect
,
sec_type
,
hFile
);
if
(
status
==
STATUS_OBJECT_NAME_EXISTS
)
SetLastError
(
ERROR_ALREADY_EXISTS
);
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