Jump to content

PrtResetAbort: Difference between revisions

From EDM2
Created page with "PrtResetAbort resets an aborted print job to allow a print driver to send multiple reset sequences to the printer. After PrtResetAbort is called successfully, the print driver..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
PrtResetAbort resets an aborted print job to allow a print driver to send multiple reset sequences to the printer. After PrtResetAbort is called successfully, the print driver can issue PrtWrite for this device handle  
PrtResetAbort resets an aborted print job to allow a print driver to send multiple reset sequences to the printer. After PrtResetAbort is called successfully, the print driver can issue [[PrtWrite]] for this device handle.


==Syntax==
==Syntax==
  PrtResetAbort(hDevice);
  PrtResetAbort(hDevice)
 
==Parameters==
==Parameters==
; hDevice (HFILE) - input  
;hDevice (HFILE) - input: The device handle returned by [[PrtOpen]].
: The device handle returned by PrtOpen.  


==Return Code==
==Return Code==
; rc (ULONG) - returns  
;rc (ULONG) - returns: Return codes.
: Return codes.  
* 0 : Success
 
* 6 (ERROR_INVALID_HANDLE) : Invalid handle given.
* 0  
*127 (ERROR_PROC_NOT_FOUND) : Port driver does not export the [[SplPdResetAbort]] API.
: Success  
* 6(ERROR_INVALID_HANDLE)  
: Invalid handle given.  
* 127(ERROR_PROC_NOT_FOUND)  
: Port driver does not export the SplPdResetAbort API.  


==Remarks==
==Remarks==
This function was added to OS/2 Warp, Version 3, to allow print drivers to abort jobs more quickly. The print drivers do this by checking for PrtResetAbort during the print driver's abort processing. If the API exists, the print driver calls PrtAbort to cancel all output being sent to the printer. After all output is aborted, the print driver calls PrtResetAbort, which allows the print driver to call PrtWrite to send the reset sequence to the printer.  
This function was added to OS/2 Warp, Version 3, to allow print drivers to abort jobs more quickly. The print drivers do this by checking for PrtResetAbort during the print driver's abort processing. If the API exists, the print driver calls PrtAbort to cancel all output being sent to the printer. After all output is aborted, the print driver calls PrtResetAbort, which allows the print driver to call PrtWrite to send the reset sequence to the printer.
 
PrtClose must still be issued to close the device connection.
==Example Code==
<PRE>
 
#define INCL_SPL
#define INCL_SPLDOSPRINT
#include <os2.h>
 
HFILE    hDevice;  /*  The device handle returned by PrtOpen. */
ULONG    rc;      /*  Return codes. */


rc = PrtResetAbort(hDevice);
PrtClose must still be issued to close the device connection.
</PRE>


[[Category:Prt]]
[[Category:Prt]]

Latest revision as of 20:36, 30 May 2021

PrtResetAbort resets an aborted print job to allow a print driver to send multiple reset sequences to the printer. After PrtResetAbort is called successfully, the print driver can issue PrtWrite for this device handle.

Syntax

PrtResetAbort(hDevice)

Parameters

hDevice (HFILE) - input
The device handle returned by PrtOpen.

Return Code

rc (ULONG) - returns
Return codes.
  • 0 : Success
  • 6 (ERROR_INVALID_HANDLE) : Invalid handle given.
  • 127 (ERROR_PROC_NOT_FOUND) : Port driver does not export the SplPdResetAbort API.

Remarks

This function was added to OS/2 Warp, Version 3, to allow print drivers to abort jobs more quickly. The print drivers do this by checking for PrtResetAbort during the print driver's abort processing. If the API exists, the print driver calls PrtAbort to cancel all output being sent to the printer. After all output is aborted, the print driver calls PrtResetAbort, which allows the print driver to call PrtWrite to send the reset sequence to the printer.

PrtClose must still be issued to close the device connection.