Jump to content

PrtClose: Difference between revisions

From EDM2
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..."
 
mNo edit summary
Line 29: Line 29:
</PRE>
</PRE>


[[Category:Spl]]
[[Category:Prt]]

Revision as of 19:59, 19 November 2019

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