CallCFunctionFast()

Syntax

Result = CallCFunctionFast(*FunctionPointer [,Parameter1 [, Parameter2...]])
Description
Calls a function directly, using its address. The function is expected to use the cdecl calling convention (the convention used by the C language).

Parameters

*FunctionPointer The address of the function to call.

This pointer may be found using the GetFunction(), GetFunctionEntry() or LibraryFunctionAddress() functions. The use of this function is the fastest method with which to call library functions, especially when the results of a call to: GetFunction() or LibraryFunctionAddress() have been stored. This is due to the fact that this function is not required to search for the name of the library function.
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.

Remarks

If the function is described as 'cdecl' then the use of this function is required. However, most DLLs used within the Microsoft Windows OS do not use this form, so CallFunctionFast() should be sufficient in most cases. To call a function that uses the 'stdcall' calling convention, use the CallFunctionFast() 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

GetFunction(), CallFunctionFast(), prototypes

Supported OS

All

<- CallCFunction() - Library Index - CallFunction() ->