Installs a function from a DLL into a Panther applicationint sm_slib_install(char *fnc_spec, int language, int return_type);
- A string that includes the name of the function to install and a comma-delimited list of its argument types enclosed in parentheses:
Panther supports string and integer arguments, specified by
i, respectively. Specify any combination of strings and integers from zero to five arguments. Panther also supports functions with six integer arguments.
For example, this statement installs the Windows library function FindWindow, which expects two string arguments:err = sm_slib_install
("FindWindow(s,s)", SLIB_C, SLIB_INTFNC);
- Specifies which language calling convention to use when pushing this function's arguments onto the code stack. The convention that you specify must conform to the order in which the function expects to find its arguments stacked. Supply one of these identifiers:
- Arguments are pushed onto the stack in left-to-right order. Windows functions usually use this convention.
- Arguments are pushed onto the stack in right-to-left order. Microsoft Visual C++ does not support this convention.
- The installed function's return type, specified by one of these arguments:SLIB_INTFNC
SLIB_ZROFNCspecifies to ignore the installed function's return value and always to return 0.
sm_slib_installinstalls the specified function from a shared library previously installed by sm_slib_load. Panther searches for the function in all libraries loaded by
sm_slib_load, starting with the one most recently loaded. This function is installed as a prototyped function and can be called directly from JPL modules.
Note: In the Windows distribution, Panther automatically loads the DLLs
USER32in that order. All functions in these libraries are available for installation.