KCssCall

C Styled Script
Reference Manual

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using The CSS Executive
Language
Directives
System Library
String Library
Regular Expression Lib.
File Library
Database Library
C API
   Embedding CSS
   Writing Libraries
   API Reference
      KCssAddFunc
      KCssCall
      KCssClose
      KCssEnableTrace
      KCssGet
      KCssGetError
      KCssGetResult
      KCssIsTrace
      KCssLoadLibrary
      KCssLoadScriptFile
      KCssLoadScriptMem
      KCssOpen
      KCssSet
      KCssSetError
      KCssSetResult
      KCssShow
      KCssStartDate
      KCssStartTime
      KCssVarResize
      KCssVarSizeof
C++ API
CSS Links
  
long KCssAPI KCssCall(                   /* call function */
   KCssHandle aHandle,                      /* CSS handle */
   const char *aFileName,                   /* file/module caller belongs to */
   const char *aFuncName,                   /* function name */
   long aArgCount,                          /* # of arguments following */
   char *aParam[]                           /* parameter list. NULL if no args */
);

Calls any CSS, C or C++ function known to CSS. Parameters are passed as a list of ASCIZ strings.

Example:

// call strSubString
static char *args[] = { "The quick brow fox", "5", "10" };
long errs;
errs = KCssCall(css, "MyProg.exe", "strSubString", sizeof(args)/sizeof(char*), args);
if (errs) .... // error handling
 
// get size of return value first for buffer allocation:
long size;
errs = KCssGetResult(css, NULL, &size);
if (errs) .... // error handling
 
// now allocate buffer and retrieve value
char* buf = new char[size];
errs = KCssGetResult(css, buf, &size);
if (errs) .... // error handling
 
...
 
// when value no longer needed, dont forget to release buffer
delete [] buf;
 Copyright © IBK LandquartLast revised by Peter Koch, 24.02.00<< Back  Top  Next >>