SplPdClose
Appearance
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);