PrtClose

PrtClose closes the output device identified by hDevice and releases the spooler port semaphore. It also calls the port driver for port termination.

Syntax
rc = PrtClose(hDevice);

Parameters

 * hDevice (HFILE) - input
 * The device handle returned by PrtOpen.

Return Code

 * rc (ULONG) - returns
 * Return codes.

This function returns the same codes as DosClose:
 * ERROR_ACCESS_DENIED
 * ERROR_FILE_NOT_FOUND
 * ERROR_INVALID_HANDLE
 * NO_ERROR

Remarks
If this function returns an error, it is reissued to close the device.

Example Code

 * 1) include 

HFILE   hDevice;  /*  The device handle returned by PrtOpen. */ ULONG   rc;       /*  Return codes. */

rc = PrtClose(hDevice); 