Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index > Using the DLCALL Function

Declaration Logic

Scroll Prev Top Next More

Calls to a function OR procedure from ANY DLL must be DECLARED at Least ONCE in the session in which they will be referenced.

 

Two Calling Conventions are supported, using the STDCALL and CDECL Keyword in the Declaration.

 

STDCALL

 

Function Declaration using STDCALL:

 

STDCALL FUNCTION 'functionName' (PTR VARCHAR (SIZE), ....... ) : VARCHAR (SIZE)

STDCALL FUNCTION 'functionName' ALIAS 'functionAliasName' (PTR TEXT (SIZE), ....... ) : TEXT (SIZE)

 

Procedure Declaration using STDCALL:

 

STDCALL VOID FunctionOrProcedureThatHasNoReturnValue (PTR TEXT (SIZE))

 

Windows API Declaration using STDCALL:

 

STDCALL FUNCTION 'GetCurrentDirectoryA' ALIAS 'GetCurrentDir' (PTR TEXT, INTEGER ) : INTEGER

 

 

CDECL

 

Function Declaration using CDECL:

 

CDECL FUNCTION 'functionName' (INTEGER) : INTEGER

CDECL FUNCTION 'functionName' ALIAS 'functionAliasName' (PTR DOUBLE) : DOUBLE

 

Procedure Declaration using CDECL

 

CDECL VOID FunctionOrProcedureThatHasNoReturnValue (PTR TEXT (SIZE))

 

 

Important Notes:

 

'SIZE' applies to TEXT and VARCHAR Data Types.

Parameters in the Declaration are in the REVERSE order from the Actual Function or Procedure in the DLL.

Parameters can be 0 to n Parameters of any legal R:BASE Data type.

Function Names ARE CASE SENSITIVE in the Declaration ONLY.

The Case must match the casing used in the DLL.

Case is INSENSITIVE when used in DLCALL.