how to call a dll from app developper

Discuss PC Developer and Web Developer projects and features here.
Post Reply
rowentaRT
Posts: 4
http://meble-kuchenne.info.pl
Joined: Thu Feb 12, 2026 9:34 pm

how to call a dll from app developper

Post by rowentaRT »

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

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

Post by BenR »

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.

BLE DLL.zip
(1.63 MiB) Downloaded 5 times

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.

BLE GATT SPP.fcpcd
(52 KiB) Downloaded 5 times

Let us know how you're getting on.

Post Reply