p4SetScreenRequestFunction()

Register Function to Start Screen Client

Screen Output

Introduction

The P4API p4SetScreenRequestFunction() function is used to specify the name of a function to call when screen output is required, and there is no screen Client (GUI Client or Telnet Client) currently connected to this kernel session. The caller has to supply this function.

BOOL p4SetScreenRequestFunction(
   SESSION_HANDLE_T kernelSessionHandle,
   PSCREEN_REQUEST_FUNCTION pScreenRequestFunction
);

Parameters

KernelSessionHandle

[in] The kernel session handle for a PROIV Virtual Machine session, as returned by a prior call to p4OpenPro4().

PscreenRequestFunction

[in] A pointer to the function to call when the kernel needs to initiate screen processing. Specifying NULL resets this to the default for this session.

Return Values

TRUE if OK.

Remarks

This function is used to allow the caller to control how to start a Client to process screen I/O. The function must be defined with a compatible parameter list to the expected one (defined in p4api.h). For example:

int processScreenRequired(SESSION_HANDLE_T hKrnlSession,
   BOOL bGuiMode,
   const char *szHostMachine,
   int nClientPort,
   const char *pCommand,
   const char *pCommandDir);
&
if (!p4SetScreenRequestFunction (sessionHandle,
         processScreenRequired)) {
   fprintf(stderr, "p4SetScreenRequestFunction failed, error %d\n",
         p4GetLastError());
   stat = -1;
}

See the definition of processScreenRequired() below for an example of the function. If no screen request function is defined, the P4API interface uses its default processing.

Comment on this topic

Topic ID: 540194

 
 
 

Table of Contents

Index

Glossary

-Search-

Back