![]() p4ClosePro4() |
![]() DEVELOPER |
![]() |
p4ClosePro4()
Drop Task Kernel Resources
Connection/Disconnection Calls
Introduction
The P4API p4ClosePro4() function is used to signal that a calling application will not be using a particular kernel again. It is advantageous to do a corresponding p4ClosePro4() for every p4OpenPro4(), in order to release some connection resource information held by the Kernel Managers. A p4CloseSystem() will effectively do a set of p4ClosePro4() calls as required, but it is strongly recommended to do explicit clean-up instead in a timely fashion.
BOOL p4ClosePro4 (
SESSION_HANDLE_T kernelSessionHandle
);
Parameters
kernelSessionHandle
[in] The kernel-session-id for a PROIV Virtual Machine session, as returned by a prior call to p4OpenPro4().
Return Values
If no error occurs, p4ClosePro4() returns TRUE. Otherwise, it returns a value of FALSE, and a specific error code can be retrieved by calling p4GetLastError(). If you close a kernelSessionHandle that was not open, you get a non-fatal error returned. You will receive an error if you subsequently use a closed kernelSessionHandle.
Remarks
P4ClosePro4() must be used to terminate a connection to a PROIV Virtual Machine.
Topic ID: 540184