CallCFunction()

Syntax

Result = CallCFunction(#Library, FunctionName$ [,Parameter1 [, Parameter2...]])
Description
Calls a function, in the specified library, in such a manner that the parameters are handled in the same fashion as a normal 'C' language function.

Parameters

#Library The library from which the function will be called.
FunctionName$ The name of the function to call. The function name is case sensitive.
Parameter1, Parameter2, ... The parameters for the function. The number of parameters must match the parameters of the called function. The maximum number of supported parameters is 20.

Return value

Returns the return-value of the called function or zero if the library does not contain a function with the given name.

Remarks

If the function is described as 'cdecl' then this function must be used. However, most DLLs used within the Microsoft Windows OS do not use this form, so CallFunction() should be sufficient in most cases. To call a function that uses the 'stdcall' calling convention, use the CallFunction() function.

Note: This function is not very flexible and does not handle string/float/double/quad parameters or string/float/double/quad returns. The use of prototypes is now strongly recommended.

See Also

CallFunction(), GetFunction(), prototypes

Supported OS

All

Library Index - CallCFunctionFast() ->