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
07ca1afb
Commit
07ca1afb
authored
Jul 12, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Jul 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Do not omit mandatory argument to WriteFile.
parent
5bd5c895
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
init.c
dlls/gdi32/enhmfdrv/init.c
+4
-2
init.c
dlls/gdi32/mfdrv/init.c
+5
-3
No files found.
dlls/gdi32/enhmfdrv/init.c
View file @
07ca1afb
...
...
@@ -193,6 +193,7 @@ static BOOL EMFDRV_DeleteDC( PHYSDEV dev )
BOOL
EMFDRV_WriteRecord
(
PHYSDEV
dev
,
EMR
*
emr
)
{
DWORD
len
;
DWORD
bytes_written
;
ENHMETAHEADER
*
emh
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
...
...
@@ -205,7 +206,7 @@ BOOL EMFDRV_WriteRecord( PHYSDEV dev, EMR *emr )
physDev
->
emh
->
nRecords
++
;
if
(
physDev
->
hFile
)
{
if
(
!
WriteFile
(
physDev
->
hFile
,
emr
,
emr
->
nSize
,
NULL
,
NULL
))
if
(
!
WriteFile
(
physDev
->
hFile
,
emr
,
emr
->
nSize
,
&
bytes_written
,
NULL
))
return
FALSE
;
}
else
{
DWORD
nEmfSize
=
HeapSize
(
GetProcessHeap
(),
0
,
physDev
->
emh
);
...
...
@@ -316,6 +317,7 @@ HDC WINAPI CreateEnhMetaFileW(
EMFDRV_PDEVICE
*
physDev
;
HANDLE
hFile
;
DWORD
size
=
0
,
length
=
0
;
DWORD
bytes_written
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
filename
)
);
...
...
@@ -407,7 +409,7 @@ HDC WINAPI CreateEnhMetaFileW(
free_dc_ptr
(
dc
);
return
0
;
}
if
(
!
WriteFile
(
hFile
,
physDev
->
emh
,
size
,
NULL
,
NULL
))
{
if
(
!
WriteFile
(
hFile
,
physDev
->
emh
,
size
,
&
bytes_written
,
NULL
))
{
free_dc_ptr
(
dc
);
CloseHandle
(
hFile
);
return
0
;
...
...
dlls/gdi32/mfdrv/init.c
View file @
07ca1afb
...
...
@@ -321,6 +321,7 @@ HDC WINAPI CreateMetaFileW( LPCWSTR filename )
DC
*
dc
;
METAFILEDRV_PDEVICE
*
physDev
;
HANDLE
hFile
;
DWORD
bytes_written
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
filename
)
);
...
...
@@ -335,8 +336,8 @@ HDC WINAPI CreateMetaFileW( LPCWSTR filename )
free_dc_ptr
(
dc
);
return
0
;
}
if
(
!
WriteFile
(
hFile
,
physDev
->
mh
,
sizeof
(
*
physDev
->
mh
),
NULL
,
NULL
))
{
if
(
!
WriteFile
(
hFile
,
physDev
->
mh
,
sizeof
(
*
physDev
->
mh
),
&
bytes_written
,
NULL
))
{
free_dc_ptr
(
dc
);
CloseHandle
(
hFile
);
return
0
;
...
...
@@ -387,6 +388,7 @@ static DC *MFDRV_CloseMetaFile( HDC hdc )
{
DC
*
dc
;
METAFILEDRV_PDEVICE
*
physDev
;
DWORD
bytes_written
;
TRACE
(
"(%p)
\n
"
,
hdc
);
...
...
@@ -423,7 +425,7 @@ static DC *MFDRV_CloseMetaFile( HDC hdc )
physDev
->
mh
->
mtType
=
METAFILE_MEMORY
;
/* This is what windows does */
if
(
!
WriteFile
(
physDev
->
hFile
,
physDev
->
mh
,
sizeof
(
*
physDev
->
mh
),
NULL
,
NULL
))
{
&
bytes_written
,
NULL
))
{
free_dc_ptr
(
dc
);
return
0
;
}
...
...
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