Jump to content

PrtClose

From EDM2
Revision as of 19:58, 19 November 2019 by Martini (talk | contribs) (Created page with "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 = PrtClos...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

#include <os2.h>

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

rc = PrtClose(hDevice);