8.3.2 The RexxRegisterFunctionExe() function
This function is used to register an external function handler
with the interface. The external function handler must be a
procedure located within the code of the application. After
registration, the REXX interpreter can execute external functions
as if they were built-ins.
The prototype for RexxRegisterFunctionExe() is:
APIRET APIENTRY RexxRegisterFunctionExe(
PSZ FuncName,
PFN EntryPoint
) ;
All the parameters are input, and their significance are:
[FuncName]
Points to an ASCII NUL terminated character string which
defines the name of the external function to be
registered. This is the same name as the REXX
interpreter uses with a function call or via the CALL
command.
[EntryPoint]
Points to the entrypoint of the external function
handler routine for the function to be registered. See
the section on External Function Handlers for more
information.
The area pointed to by FuncName is copied to a private area in
the interface, so the programmer may de-allocate or reuse the area
used for this parameter after the call has returned.
The RexxRegisterFunctionExe() returns an unsigned long, which
carries status information describing the outcome of the
operation. The status will be one of the RXFUNC values:
[ RXFUNC_OK]
The handler was successfully registered.
[RXFUNC_DUP]
The handler was successfully registered. There already
existed another external function handler which was
registered with RexxRegisterFunctionExe(), but this will
be shadowed by the newly registered handler.
[RXFUNC_NOEMEM]
The handler was not registered, due to lack of memory.
PREV NEXT