SplPdClose: Difference between revisions
Appearance
Created page with "SplPdClose is an API exported by port drivers. It is called during PrtClose to close the device connection and frees the handle. == Syntax == SplPdClose(hDevice); == Para..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
SplPdClose is an API exported by port drivers. It is called during PrtClose to close the device connection and frees the handle. | SplPdClose is an API exported by port drivers. It is called during PrtClose to close the device connection and frees the handle. | ||
== Syntax == | == Syntax == | ||
SplPdClose(hDevice) | SplPdClose(hDevice) | ||
== Parameters == | == Parameters == | ||
; hDevice (HFILE) - input | ; hDevice (HFILE) - input: Handle from SplPdOpen. | ||
: Handle from SplPdOpen. | |||
== 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. For all error codes except this one, the SplPdClose must be reissued. | ||
:Invalid handle given. For all error codes except this one, the SplPdClose must be reissued. | * 29(ERROR_WRITE_FAULT) :Failure attempting to write buffered data to the device, or the BIDI_ENDJOB bracket failed to be transmitted to the printer. | ||
* 29(ERROR_WRITE_FAULT) | |||
:Failure attempting to write buffered data to the device, or the BIDI_ENDJOB bracket failed to be transmitted to the printer. | |||
:;Note:: SplPdClose performs an implicit SplPdSet(BIDI_ENDJOB) if BIDI_STARTJOB has already been issued, unless the job has been aborted due to an offline printer. The port driver should call PrtSet(BIDI_ENDJOB) before closing the connection to the port. | :;Note:: SplPdClose performs an implicit SplPdSet(BIDI_ENDJOB) if BIDI_STARTJOB has already been issued, unless the job has been aborted due to an offline printer. The port driver should call PrtSet(BIDI_ENDJOB) before closing the connection to the port. | ||
== Sample == | == Sample == | ||
Line 29: | Line 26: | ||
rc = SplPdClose(hDevice); | rc = SplPdClose(hDevice); | ||
</pre> | </pre> | ||
[[Category:Spl]] | [[Category:Spl]] |
Latest revision as of 21:42, 2 July 2023
SplPdClose is an API exported by port drivers. It is called during PrtClose to close the device connection and frees the handle.
Syntax
SplPdClose(hDevice)
Parameters
- hDevice (HFILE) - input
- Handle from SplPdOpen.
Returns
- rc (ULONG) - returns
- Return codes.
- 0 Success
- 6(ERROR_INVALID_HANDLE) :Invalid handle given. For all error codes except this one, the SplPdClose must be reissued.
- 29(ERROR_WRITE_FAULT) :Failure attempting to write buffered data to the device, or the BIDI_ENDJOB bracket failed to be transmitted to the printer.
- Note
- : SplPdClose performs an implicit SplPdSet(BIDI_ENDJOB) if BIDI_STARTJOB has already been issued, unless the job has been aborted due to an offline printer. The port driver should call PrtSet(BIDI_ENDJOB) before closing the connection to the port.
Sample
#define INCL_SPL #define INCL_SPLBIDI #include <os2.h> HFILE hDevice; /* Handle from SplPdOpen. */ ULONG rc; /* Return codes. */ rc = SplPdClose(hDevice);