![]() p4OpenPro4() |
![]() DEVELOPER |
![]() |
p4OpenPro4()
Setup Task Kernel with Correct Environment
Connection/Disconnection Calls
Introduction
The P4API p4OpenPro4() function is used to initiate a connection to a PROIV Virtual Machine running with the specified Environment.
SESSION_HANDLE_T p4OpenPro4
(
SYSTEM_HANDLE_T systemHandle,
const char *szEnvironment,
const char *szOperId,
const char *szCoDiv,
const char *szOperPassword
);
Parameters
systemHandle
[in] The system-session-id for a Kernel Manager session, as returned by a prior call to p4SystemLogon().
szEnvironment
[in] The name of the required kernel environment.
szOperId
[in] The PROIV operator-id to be used by the kernel.
szCoDiv
[in] The PROIV company/division code to be used by the kernel.
szOperPassword
[in] The password to use for PROIV operator-id.
Return Values
If no error occurs, p4OpenPro4() returns a kernel-session-id for the connection, which must be supplied to other P4API calls related to this session. Otherwise, it returns a value of INVALID_KERNEL_HANDLE, and a specific error code can be retrieved by calling p4GetLastError().
Remarks
p4OpenPro4() is used to prepare for an impending connection to a PROIV Virtual Machine running with the specified environment. This call does not establish such a connection, neither does it reserve a kernel, nor does it cause a PROIV licence seat to be assigned. p4SystemLogon() must first be called to establish a connection with a Kernel Manager. This returns the value of systemHandle.
A calling application can have many active p4OpenPro4 calls simultaneously, either using the same systemHandle or different ones.
The szEnvironment parameter identifies the required kernel environment.
The Environment Name is used by the Kernel Manager to identify which kernel configuration to use. The Kernel Manager uses a configuration file to define the valid Environment Names, and the pathname of the corresponding kernel configuration file. This indirection is done (rather than just passing an INI pathname as the environment) to avoid server directory location knowledge having to be held on all the Client machines. The INI file will contain any other information needed to set up the correct kernel environment.
Topic ID: 540191