Jump to content

PrtClose: Difference between revisions

From EDM2
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
PrtClose closes the output device identified by hDevice and releases the spooler port semaphore. It also calls the port driver for port termination.  
PrtClose closes the output device identified by hDevice and releases the spooler port semaphore. It also calls the port driver for port termination.


==Syntax==
==Syntax==
  rc = PrtClose(hDevice);
  PrtClose(hDevice)
 
==Parameters==
==Parameters==
; hDevice (HFILE) - input  
;hDevice (HFILE) - input: The device handle returned by [[PrtOpen]].
: The device handle returned by PrtOpen.  
 
==Return Code==
==Return Code==
; rc (ULONG) - returns  
;rc (ULONG) - returns: Return codes.
: Return codes.  
This function returns the same codes as DosClose:
 
* ERROR_ACCESS_DENIED
This function returns the same codes as DosClose:  
* ERROR_FILE_NOT_FOUND
* ERROR_ACCESS_DENIED  
* ERROR_INVALID_HANDLE
* ERROR_FILE_NOT_FOUND  
* NO_ERROR
* ERROR_INVALID_HANDLE  
* NO_ERROR  


==Remarks==
==Remarks==
If this function returns an error, it is reissued to close the device.  
If this function returns an error, it is reissued to close the device.
 
==Example Code==
<PRE>
#include <os2.h>
 
HFILE    hDevice;  /*  The device handle returned by PrtOpen. */
ULONG    rc;      /*  Return codes. */
 
rc = PrtClose(hDevice);
</PRE>


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

Latest revision as of 20:31, 30 May 2021

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

Syntax

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.