Salesforce

CallDLLF (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

CallDLLF (Magic xpa 3.x)

Enables a dynamic and direct call to a DLL from within Magic xpa to an external Fastcall function.

Syntax:

CallDLLF('modulename.functionname','argument type string',arg1,arg2)

Parameters:

modulename.functionname – The module and function names from the DLL.

Argument type string – A string in which each character represents the type of argument. The last character represents the type of the return value of the function.
Click here for a list of argument types.

Arg1, Arg2 – The function arguments from the DLL.

Returns:

The return value of the function in the DLL.

Only the return value will be returned to Magic xpa. Any modifications made to the variables sent will not be reflected in Magic xpa.

Examples:

CallDLLF('mydll.lmath','1L44', Action, A, B) where the C function is: long lmath (char action, long *a, long b) gives the return value of the lmath function in the DLL.

CallDLLF('mydll.add_str', 'AAA', A, B) where the C function is: char *add_str (char *a, char *b) gives the return value of the add_str function in the DLL.

Note:

A lot of DLLs require the "handle" of a window. This is an identification number for each existing window. It's easy to supply this to your CallDLL, using the Magic xpa WinHWND() function. It takes one parameter, the generation, so calling it for the current task's window will always be WinHWND(0).

Reference
Attachment 
Attachment