sysLoadLibrary

C Styled Script
Reference Manual

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using The CSS Executive
Language
Directives
System Library
   sysCommand
   sysDate
   sysDirectory
   sysElapsed
   sysEnvVar
   sysLoadScript
   sysLoadLibrary
   sysLog
   sysLogFile
   sysLogLevel
   sysProfile
   sysPrompt
   sysSleep
   sysShow
   sysStartDate
   sysStartTime
   sysSystemProfile
   sysTime
   sysTrace
   sysUserProfile
String Library
Regular Expression Lib.
File Library
Database Library
C API
C++ API
CSS Links
  
sysLoadLibrary(
  const dllname) // name of library

Loads a library (DLL) at runtime.

OS/2: The Library is searched in all directories listed by LIBPATH in CONFIG.SYS, or in the environment variables BEGINLIBPATH and ENDLIBPATH.

Win32: The Library is searched in the directory where CSS.EXE is (respectively your own VisualAge C++ Program using the CSS API), the current directory, and all directories listed in the PATH environment variable.

To access any functions or identifiers of the library they have to be forward declared (usually by a .hss file).

Example:

#loadLibrary 'KcSysLib'
 
static const strLib = 'KcStrLib'
 
#loadScript strLib+'.hss' // include forwards
 
main()
{
   sysLoadLibrary(strLib); // load KcStrLib.css
   sysLog(strUpper('john wayne'));
}
NOTES:
CSS will not load the same library more than once; any attemps to do so will be silently ignored.
I recommend to load the forward declarations by #loadScript rather than #include, because that will avoid multiple includes. (In C/C++ you would have to make constructions like #ifndef _XXX_ ... #define _XXX_ ... body ... #endif)
 Copyright © IBK LandquartLast revised by Peter Koch, 24.02.00<< Back  Top  Next >>