/************************************************************************ * PSDRV_EndDoc */ INT PSDRV_EndDoc( PHYSDEV dev ) { PSDRV_PDEVICE *physDev = get_psdrv_dev( dev ); INT ret = 1; if(!physDev->job.id) { FIXME("hJob == 0. Now what?\n"); return 0; } if(!physDev->job.OutOfPage) { WARN("Somebody forgot an EndPage\n"); PSDRV_EndPage( dev ); } if (physDev->job.PageNo) PSDRV_WriteFooter( dev ); ret = EndDocPrinter(physDev->job.hprinter); ClosePrinter(physDev->job.hprinter); physDev->job.hprinter = NULL; physDev->job.id = 0; HeapFree( GetProcessHeap(), 0, physDev->job.doc_name ); physDev->job.doc_name = NULL; return ret; }
/************************************************************************ * PSDRV_EndDoc */ INT PSDRV_EndDoc( PSDRV_PDEVICE *physDev ) { INT ret = 1; if(!physDev->job.hJob) { FIXME("hJob == 0. Now what?\n"); return 0; } if(!physDev->job.OutOfPage) { WARN("Somebody forgot an EndPage\n"); PSDRV_EndPage( physDev ); } PSDRV_WriteFooter( physDev ); if( CloseJob16( physDev->job.hJob ) == SP_ERROR ) { WARN("CloseJob error\n"); ret = 0; } physDev->job.hJob = 0; HeapFree(GetProcessHeap(), 0, physDev->job.DocName); physDev->job.DocName = NULL; return ret; }