return 1;
case QUERYESCSUPPORT:
- if(cbInput != 2) {
- WARN("cbInput != 2 (=%d) for QUERYESCSUPPORT\n", cbInput);
+ if(cbInput < 2) {
+ WARN("cbInput < 2 (=%d) for QUERYESCSUPPORT\n", cbInput);
return 0;
} else {
UINT16 num = *(UINT16 *)PTR_SEG_TO_LIN(lpInData);
}
case SETABORTPROC:
- FIXME("SETABORTPROC: Ignoring\n");
-
-/* dc->w.lpfnPrint = (FARPROC16)lpInData;
- */
+ TRACE("SETABORTPROC\n");
+ dc->w.spfnPrint = (FARPROC16)lpInData;
return 1;
case STARTDOC:
/* save the callback address and call Control with hdc as lpInData */
HDC16 *seghdc = SEGPTR_NEW(HDC16);
*seghdc = dc->hSelf;
- dc->w.lpfnPrint = (FARPROC16)lpInData;
+ dc->w.spfnPrint = (FARPROC16)lpInData;
nRet = PRTDRV_Control(physDev->segptrPDEVICE, nEscape,
SEGPTR_GET(seghdc), lpOutData);
SEGPTR_FREE(seghdc);
INT GraphicsMode; /* Graphics mode */
INT DCOrgX; /* DC origin */
INT DCOrgY;
- FARPROC16 lpfnPrint; /* AbortProc for Printing */
+ FARPROC16 spfnPrint; /* 16bit AbortProc for Printing */
+ ABORTPROC lpfnPrint; /* 32bit AbortProc for Printing */
INT CursPosX; /* Current position */
INT CursPosY;
INT ArcDirection;
*/
INT WINAPI StartDocA(HDC hdc ,const DOCINFOA* doc)
{
+ TRACE("DocName = '%s' Output = '%s' Datatype = '%s'\n",
+ doc->lpszDocName, doc->lpszOutput, doc->lpszDatatype);
return Escape(hdc,
STARTDOC,
strlen(doc->lpszDocName),
BOOL16 WINAPI QueryAbort16(HDC16 hdc, INT16 reserved)
{
DC *dc = DC_GetDCPtr( hdc );
+ BOOL16 ret;
- if ((!dc) || (!dc->w.lpfnPrint))
- return TRUE;
- return Callbacks->CallDrvAbortProc(dc->w.lpfnPrint, hdc, 0);
+ if(!dc) {
+ ERR("Invalid hdc %04x\n", hdc);
+ return FALSE;
+ }
+
+ if(!dc->w.lpfnPrint && !dc->w.spfnPrint)
+ return TRUE;
+
+ if(dc->w.lpfnPrint && dc->w.spfnPrint)
+ FIXME("16 and 32 bit AbortProcs set?\n");
+
+ if(dc->w.spfnPrint) {
+ TRACE("Calling 16bit AbortProc\n");
+ ret = Callbacks->CallDrvAbortProc(dc->w.spfnPrint, hdc, 0);
+ } else {
+ TRACE("Calling 32bit AbortProc\n");
+ ret = dc->w.lpfnPrint(hdc,0);
+ }
+ return ret;
}
/**********************************************************************
INT16 WINAPI SetAbortProc16(HDC16 hdc, SEGPTR abrtprc)
{
return Escape16(hdc, SETABORTPROC, 0, abrtprc, (SEGPTR)0);
-}
+}
/**********************************************************************
* SetAbortProc32 (GDI32.301)
*/
INT WINAPI SetAbortProc(HDC hdc, ABORTPROC abrtprc)
{
- FIXME("stub\n");
- return 1;
+ DC *dc = DC_GetDCPtr( hdc );
+
+ dc->w.lpfnPrint = abrtprc;
+ return TRUE;
}