Create a dll

From Flowcode Help
Revision as of 11:55, 23 November 2014 by Kersing (talk | contribs) (Created page with "==!!This page is a work in progress!!== Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode. ==Re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

!!This page is a work in progress!!

Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode.

Requirements:

To create a DLL a compiler is required. Microsoft provides Visual Studio Community edition for free (certain restrictions apply, see the FAQ on the page). The installer is relatively small, however it will download and install all required software which (depending on your internet connection) might take considerable time.

This walkthrough assumes the reader is familiar with the C language as the code for the DLL will be written in C.

Create a DLL project

All code and associated settings in Visual Studio are stored inside a project. As we are creating a DLL we need to appropriate project.

  1. From the FILE menu, select New->Project.
  2. In the left pane, select Installed, Templates, Visual C++, Win32. In the right pane select Win32 Console Application
  3. In the bottom pane enter the name for the application and a solution name. We will use 'DemoDLL' for the Name and 'DynamicLibraries' for the Solution Name.
  4. Choose the OK button to create the project. This opens the Win32 Application Wizard. Choose the Next button on the first page of the wizard.
  5. On the Application Settings page, select DLL and choose the Finish button.

Add code to the project