Page 1 of 1

Calling a DLL from Flowcode

Posted: Thu Aug 15, 2013 5:19 pm
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 401 times
Jonny