Description
Sets the property fields with user-specified values prior to calling PBORCA_ExecutableCreate.
Syntax
INT PBORCA_SetExeInfo ( HPBORCA hORCASession, PBORCA_EXEINFO *pExeInfo );
Argument |
Description |
---|---|
hORCASession |
Handle to previously established ORCA session |
*pExeInfo |
Pointer to a structure containing executable properties |
Return value
INT. Typical return codes are:
Return code |
Description |
---|---|
0 PBORCA_OK |
Operation successful |
-1 PBORCA_INVALIDPARMS |
Invalid parameter list (when pExeInfo or hORCASession is NULL) |
Usage
Call this function prior to calling PBORCA_ExecutableCreate.
For PowerBuilder, PBORCA_SetExeInfo also sets properties for dynamic libraries if machine code compilation is requested.
The PBORCA_EXEINFO structure is defined as follows:
typedef struct pborca_exeinfo { LPTSTR lpszCompanyName; LPTSTR lpszProductName; LPTSTR lpszDescription; LPTSTR lpszCopyright; LPTSTR lpszFileVersion; LPTSTR lpszFileVersionNum; LPTSTR lpszProductVersion; LPTSTR lpszProductVersionNum; } PBORCA_EXEINFO
The user must have already issued PBORCA_SessionOpen, PBORCA_SessionSetCurrentAppl, and PBORCA_SetLibraryList before calling PBORCA_SetExeInfo.
Information in the PBORCA_EXEINFO structure is copied to an internal ORCA control structure so that the caller can free this memory immediately upon completion of the PBORCA_SetExeInfo call.
The executable version information is deleted during PBORCA_SessionClose processing. Thus, if an ORCA program creates numerous ORCA sessions, each individual session must call PBORCA_SetExeInfo and reassign all of the elements in the PBORCA_EXEINFO structure.
The FileVersionNum and ProductVersionNum strings must consist of four integer values representing the major version number, minor version number, fix version number, and build number, with each integer value separated by a comma. For example, "12,0,0,0001".
Examples
This example sets the executable information for a PowerBuilder application:
memset(&ExeInfo, 0x00, sizeof(PBORCA_EXEINFO)); ExeInfo.lpszCompanyName = _TEXT("Appeon")); ExeInfo.lpszProductName = _TEXT("PowerBuilder 2019 DBAuto")); ExeInfo.lpszDescription = _TEXT("Batch Automation for QADB Test Suite")); ExeInfo.lpszCopyright = _TEXT("2011")); ExeInfo.lpszFileVersion = _TEXT("12.5.0.001"); ExeInfo.lpszFileVersionNum = _TEXT("12,5,0,001"); ExeInfo.lpszProductVersion = _TEXT("12.5.0.001"); ExeInfo.lpszProductVersionNum = _TEXT("12,5,0,001"); LpORCA_Info->lReturnCode = PBORCA_SetExeInfo( lpORCA_Info->hORCASession, &ExeInfo ); lpORCA_Info->hORCASession, lpLibraryNames, 2);
See also