SplPdClose: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
== Parameters == | == Parameters == | ||
; hDevice (HFILE) - input: Handle from SplPdOpen. | ; ''hDevice'' ([[HFILE]]) - input: Handle from SplPdOpen. | ||
== Returns == | == Returns == | ||
; rc (ULONG) - returns : Return codes. | ; ''rc'' ([[ULONG]]) - returns : Return codes. | ||
* 0 Success | * 0 Success |
Latest revision as of 04:24, 3 September 2025
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);