This section describes the API that you use for functions written in C or C++.
The API is defined by a header file named extfnapi.h, in the SDK\Include subdirectory of your SQL Anywhere installation directory. This header file handles the platform-dependent features of external function prototypes.
The name of the function must match that referenced in the CREATE PROCEDURE or CREATE FUNCTION statement. Suppose the following CREATE FUNCTION statement had been executed.
CREATE FUNCTION cover-name ( parameter-list ) RETURNS data-type EXTERNAL NAME 'email@example.com' LANGUAGE C_ESQL32;
The C/C++ function declaration must be as follows:
void function-name( an_extfn_api *api, void *argument-handle )
The function must return void, and must take as arguments a pointer to a structure used to call a set of callback functions and a handle to the arguments provided by the SQL procedure.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|