Record escapes in metafiles.

This commit is contained in:
Huw Davies 2003-05-19 18:44:58 +00:00 committed by Alexandre Julliard
parent 783b3236f5
commit 6ac675188a
1 changed files with 17 additions and 16 deletions

View File

@ -536,8 +536,8 @@ INT MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
{
METARECORD *mr;
DWORD len;
INT ret;
if(nEscape == MFCOMMENT) {
len = sizeof(*mr) + sizeof(WORD) + ((cbInput + 1) & ~1);
mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
mr->rdSize = len / 2;
@ -545,13 +545,12 @@ INT MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
mr->rdParm[0] = nEscape;
mr->rdParm[1] = cbInput;
memcpy(&(mr->rdParm[2]), in_data, cbInput);
MFDRV_WriteRecord( dev, mr, len);
ret = MFDRV_WriteRecord( dev, mr, len);
HeapFree(GetProcessHeap(), 0, mr);
return 1;
}
return 0;
return ret;
}
/******************************************************************
* MFDRV_GetDeviceCaps
*
@ -563,8 +562,10 @@ INT MFDRV_GetDeviceCaps(PHYSDEV dev, INT cap)
{
case TECHNOLOGY:
return DT_METAFILE;
case TEXTCAPS:
return 0;
default:
TRACE(" unsupported capability %d, will return 0\n", cap );
return 0;
}
return 0;
}