SplPdClose

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

 * 1) define INCL_SPL
 * 2) define INCL_SPLBIDI
 * 3) include 

HFILE   hDevice;  /*  Handle from SplPdOpen. */ ULONG   rc;       /*  Return codes. */

rc = SplPdClose(hDevice);