SplPdAbortDoc: Difference between revisions
Appearance
Created page with "SplPdAbortDoc is an API exported by port drivers. It is called by PrtAbort and PrtAbortDoc for document-abort processing. If FLG_COMPLETE_DATA is set, all prior data for this ..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
SplPdAbortDoc is an API exported by port drivers. It is called by PrtAbort and PrtAbortDoc for document-abort processing. If FLG_COMPLETE_DATA is set, all prior data for this job is sent to the printer. If FLG_COMPLETE_DATA is not set, all current write requests for this job are flushed and then the buffer of data is sent to reset the printer. | SplPdAbortDoc is an API exported by port drivers. It is called by PrtAbort and PrtAbortDoc for document-abort processing. If FLG_COMPLETE_DATA is set, all prior data for this job is sent to the printer. If FLG_COMPLETE_DATA is not set, all current write requests for this job are flushed and then the buffer of data is sent to reset the printer. | ||
FLG_COMPLETE_DATA is always set if the printer driver calls PrtAbort, because some older printer drivers send the reset sequence to the printer using PrtWrite, then call PrtAbort to abort the job. In this case, the printer driver relies on only PrtWrite returning after the data was sent to the printer. | FLG_COMPLETE_DATA is always set if the printer driver calls PrtAbort, because some older printer drivers send the reset sequence to the printer using PrtWrite, then call PrtAbort to abort the job. In this case, the printer driver relies on only PrtWrite returning after the data was sent to the printer. | ||
== Syntax == | == Syntax == | ||
SplPdAbortDoc(hDevice, pchData, cbData, ulFlags) | SplPdAbortDoc(hDevice, pchData, cbData, ulFlags) | ||
== Parameters == | == Parameters == | ||
; hDevice (HFILE) - input | ; hDevice (HFILE) - input:Handle from SplPdOpen. | ||
:Handle from SplPdOpen. | ;pchData (PVOID) - input:Pointer to data buffer to write after flushing all current write data. | ||
;cbData (ULONG) - input:Length of data, in bytes. | |||
;pchData (PVOID) - input | :May be 0 (zero) for no data to write. | ||
:Pointer to data buffer to write after flushing all current write data. | ;ulFlags (ULONG) - input:Abort processing flags. | ||
:Value is as follows: | |||
;cbData (ULONG) - input | ::FLG_COMPLETE_DATA - 0x00000001 : If set, then all prior data for this job must be sent to the printer. | ||
:Length of data, in bytes. | |||
:May be 0 (zero) for no data to write. | |||
;ulFlags (ULONG) - input | |||
:Abort processing flags. | |||
:Value is as follows: | |||
: | |||
== Returns == | == Returns == | ||
; rc (ULONG) - returns : Return codes. | ; rc (ULONG) - returns : Return codes. | ||
*0 Success | *0 Success | ||
*6(ERROR_INVALID_HANDLE) | *6(ERROR_INVALID_HANDLE) :Invalid handle given. | ||
:Invalid handle given. | *29(ERROR_WRITE_FAULT) :Failure attempting to write reset sequence to the device. | ||
*29(ERROR_WRITE_FAULT) | |||
:Failure attempting to write reset sequence to the device. | |||
== Sample == | == Sample == | ||
Line 51: | Line 38: | ||
== Remarks == | == Remarks == | ||
SplPdClose must still be issued to close the device connection. | SplPdClose must still be issued to close the device connection. | ||
[[Category:Spl]] | [[Category:Spl]] |
Latest revision as of 20:14, 2 July 2023
SplPdAbortDoc is an API exported by port drivers. It is called by PrtAbort and PrtAbortDoc for document-abort processing. If FLG_COMPLETE_DATA is set, all prior data for this job is sent to the printer. If FLG_COMPLETE_DATA is not set, all current write requests for this job are flushed and then the buffer of data is sent to reset the printer.
FLG_COMPLETE_DATA is always set if the printer driver calls PrtAbort, because some older printer drivers send the reset sequence to the printer using PrtWrite, then call PrtAbort to abort the job. In this case, the printer driver relies on only PrtWrite returning after the data was sent to the printer.
Syntax
SplPdAbortDoc(hDevice, pchData, cbData, ulFlags)
Parameters
- hDevice (HFILE) - input
- Handle from SplPdOpen.
- pchData (PVOID) - input
- Pointer to data buffer to write after flushing all current write data.
- cbData (ULONG) - input
- Length of data, in bytes.
- May be 0 (zero) for no data to write.
- ulFlags (ULONG) - input
- Abort processing flags.
- Value is as follows:
- FLG_COMPLETE_DATA - 0x00000001 : If set, then all prior data for this job must be sent to the printer.
Returns
- rc (ULONG) - returns
- Return codes.
- 0 Success
- 6(ERROR_INVALID_HANDLE) :Invalid handle given.
- 29(ERROR_WRITE_FAULT) :Failure attempting to write reset sequence to the device.
Sample
#define INCL_SPL #define INCL_SPLBIDI #include <os2.h> HFILE hDevice; /* Handle from SplPdOpen. */ PVOID pchData; /* Pointer to data buffer to write after flushing all current write data. */ ULONG cbData; /* Length of data, in bytes. */ ULONG ulFlags; /* Abort processing flags. */ ULONG rc; /* Return codes. */ rc = SplPdAbortDoc(hDevice, pchData, cbData, ulFlags);
Remarks
SplPdClose must still be issued to close the device connection.