Calling a DLL from Flowcode

A collection of posts and articles on getting started in Flowcode v6

Moderator: Benj

Post Reply
User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Calling a DLL from Flowcode

Post by JonnyW »

Hi. During simulation Flowcode has a pretty extensive list of calls, documented here.

However we can't provide support for everything you would want to do, so have allowed macros to call into a DLL if need be. We consider this a reasonably advanced use of Flowcode, but it is available for anyone to use.

To tell Flowcode that a macro is not to be treated as a flowcoart, but to call a DLL instead, use the following syntax for the name of the macro:
MacroName:DLL[Path_To_DLL]

You can change the calling convention of the DLL to 's' for stdcall or 'c' to cdecl. If you do not know what this does or are unsure for your DLL, chances are it is 's' (most DLL calls are). This part can be left out.

The full macro declaration for showing a message box is:

Code: Select all

MessageBoxA:DLLs[user32.dll]
This means call MessageBoxA and use the function found in user32.dll (a built-in Windows DLL) using the 'stdcall' calling convention. Documentation on MessageBox can be found here.

Have a play and please post any questions you may have - we are always happy to help.
DLL_HelloW.fcfx
(5.03 KiB) Downloaded 385 times
Jonny

Post Reply