Hi,
i would like to know how to declare and call dll from my app project ?
during export, i saw that i could declare the path to my dll but i did not see how to call it ?
the dll could be used to communicate with another process or just decode the data received from a serial link.
Thank you for your help.
Hadrien
how to call a dll from app developper
-
rowentaRT
- Posts: 4
- http://meble-kuchenne.info.pl
- Joined: Thu Feb 12, 2026 9:34 pm
-
BenR
- Matrix Staff
- Posts: 2128
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 568 times
- Been thanked: 751 times
Re: how to call a dll from app developper
Hello Hadrien,
Here's the visual studio source code for a DLL I made recently to perform BLE communications. Please note that Flowcode is a 32-bit application so the DLL must also be compiled as 32-bit x86.
In Flowcode you declare the DLL functions the same way as making a macro. In the project explorer -> Macros tab -> Add New
The name of the macro sets the function name and the path to the DLL inside the square brackets. The macros parameters and return needs to match that of the DLL.
e.g. BLESPP_IsConnected:DLLs[$(appdir)API.DLL\BLE_SPP_DLL.dll]
$(appdir) is the flowcode application directory. You could use $(srcdir) for the project file directory or you can use an absolute path. e.g. C:\SomeFolder\SomeDLL.dll
When you call that macro the DLL function will be called for you.
Here's the FLowcode project to go with the DLL example.
Let us know how you're getting on.
Here's the visual studio source code for a DLL I made recently to perform BLE communications. Please note that Flowcode is a 32-bit application so the DLL must also be compiled as 32-bit x86.
In Flowcode you declare the DLL functions the same way as making a macro. In the project explorer -> Macros tab -> Add New
The name of the macro sets the function name and the path to the DLL inside the square brackets. The macros parameters and return needs to match that of the DLL.
e.g. BLESPP_IsConnected:DLLs[$(appdir)API.DLL\BLE_SPP_DLL.dll]
$(appdir) is the flowcode application directory. You could use $(srcdir) for the project file directory or you can use an absolute path. e.g. C:\SomeFolder\SomeDLL.dll
When you call that macro the DLL function will be called for you.
Here's the FLowcode project to go with the DLL example.
Let us know how you're getting on.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel