Table of Contents

zfunc_Load

Description

Load a Zeolite extension function from a plugin.

Files

Declaration Zeolite.h
Implementation Zeolite.cpp

Function prototype

TYPE zfunc_Load(const char* lpFnName, const char* lpExportName, long rvalVarID, ZLIST hArgList);

Arguments

Name Type Comment
lpFnName const char* A handle to a C-style string containing the name of the function as is to appear in the Zeolite function list. Use the '.' (dot) character to delimit namespaces.
lpFnName const char* A handle to a C-style string containing the name of the function as it is defined in the plugin source code.
rvalVarID long The variable type ID of the return variable when the function is called. May be VarID_void if no var is returned.
hArgListPrototype ZLIST A handle to the prototype of the argument list for the function. If null, no arguments are expected.

Return value

A null handle if an error occurred, and a valid (non-null) handle to the function otherwise.

Comments

zeoexport

For zfunc_Load to succeed, the function in the plugin must be declared using the zeoexport keyword, which disables name mangling and enforces C-style name decoration. Below is an example of a 'correct' function definition:

zeoexport bool __stdcall MyFunctionName(ZVAR hRval, ZVAR hArgList) {
 
  // do your stuff here...
 
  return true;
}