CreateMetaFileW: WriteFile returns the number of bytes written for synchronous operations

svn path=/trunk/; revision=42897
This commit is contained in:
Gregor Schneider
2009-08-23 23:40:48 +00:00
parent c3d83ebfa9
commit aa38bf2535
+2 -1
View File
@@ -143,6 +143,7 @@ CreateMetaFileW(
{
HANDLE hFile;
HDC hmDC;
DWORD dwWritten;
PMETAFILEDC pmfDC = LocalAlloc(LMEM_ZEROINIT, sizeof(METAFILEDC));
if (!pmfDC) return NULL;
@@ -172,7 +173,7 @@ CreateMetaFileW(
return NULL;
}
if (!WriteFile( hFile, &pmfDC->mh, sizeof(pmfDC->mh), NULL, NULL ))
if (!WriteFile( hFile, &pmfDC->mh, sizeof(pmfDC->mh), &dwWritten, NULL ))
{
// MFDRV_DeleteDC( dc->physDev );
LocalFree(pmfDC);