Session-Level Operations
This topic discusses the session-level operations in alphabetical order.
Syntax
int FAR PASCAL PsfCloseSession(HSESSIONhSession);
Description
Closes a session.
Parameters
Parameter |
Description |
---|---|
hSession |
The session handle assigned by PsfOpenSession when the application connected to PSFORMS.DLL. |
Returns
This operation returns the following values:
Value |
Code |
Meaning |
---|---|---|
PSF_OK |
0 |
The session was successfully closed. |
PSF_NOSESS |
4 |
hSession does not identify a current session. |
Syntax
int FAR PASCAL PsfGetAPIInfo(LPPSFDEFNKEYlpDefKey);
Description
Provides the name of forms product that this DLL supports and returns the API version.
All PeopleSoft forms products use the same programming interface. They use the PsGetAPIInfo function to get the product name of the forms software that your version of PSFORMS.DLL supports.
PsfGetAPIInfo puts the product name as a string in the name field of the structure.
Parameters
Parameter |
Description |
---|---|
lpDefKey |
A pointer to a structure containing a character array for the function to which to write. The form of the structure is:
|
Returns
An integer identifying the version of this API that the DLL implements. The value is set in the PeopleSoft forms interface header file.
Syntax
int FAR PASCAL PsfOpenSession(LPSTRlpszUserName, LPSTRlpszPassword, LPHSESSIONlphSession);
Description
Connects the PeopleSoft system to the forms interface DLL using a specified login name and password.
PsfOpenSession logs in to the form software using the specified user name and password. It places a session handle in the buffer that lphSession points to. All subsequent API calls use this session handle.
PsfOpenSession always opens a new session, even when it could access a shared session.
Parameters
Parameter |
Description |
---|---|
lpszUserName |
A null-terminated string containing the user name for logging in to the forms software. |
lpszPassword |
A null-terminated string containing the password for the user identified by lpszUserName. |
lphSession |
A pointer to a buffer for the session handle that this function assigns. |
Returns
This operation returns the following values:
Value |
Code |
Meaning |
---|---|---|
PSF_OK |
0 |
The session was successfully opened. |
PSF_NOSESS |
4 |
The function was unable to establish a session. |
PSF_NOSPEC |
6 |
The forms database or server was not specified. |