PICTools Programmer's Reference
PegasusLoad

The PegasusLoad function explicitly loads a specific PICTools opcode DLL.

 
Copy Code
LONG PegasusLoad(OPERATION Op, LONG ParmVer, char PICFAR* Path)

Parameters:

Name Description
Op Specifies the opcode DLL to be loaded.
ParmVer Specifies the version of the DLL to load, ordinarily CURRENT_PARMVER.
Path Specifies the directory location from which to load the DLL.  If the application specifies 0 for the path, then the opcode DLL is explicitly loaded using the same directory search order as when it is implicitly loaded (see Notes, below).

Return Value:

The return value is ERR_NONE if able to load the requested DLL, otherwise an error value defined in ERRORS.H is returned.

Notes:

A PICTools opcode DLL is ordinarily implicitly loaded the first time Pegasus is called for the opcode and is unloaded when the application terminates.  The implicit load first looks in the directory containing the PICTools API DLL, PICN20.DLL (Win32), or PICX20.DLL (x64). If not found, the implicit load uses the normal Windows directory search order for DLL's. See the document "Deploying PICTools Applications on Linux, Solaris (SPARC and x86), AIX, and OS X" for information related to library loading on other platforms.

Using PegasusLoad allows an application a way to directly specify the directory containing the opcode DLL. It also allows the opcode DLL to be loaded at a time when error-handling may be more convenient, in case the library can't be loaded.  An application is not required to call the PegasusUnload function after calling PegasusLoad, nor is an application required to call PegasusLoad before calling PegasusUnload.

 

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback