Documentation on the DLL Tutor in the examples - Or how to implement Multi-DLL from an EXE?

I am trying to understand implementing multiple DLLs to an application in Clarion9 and have found a folder in the examples named DLL Tutor, but have not found any documentation for it. Can anyone point me in the right direction?

Can’t help you with docs, but I am sure we can answer any questions you have. For my part, it has been more that 20 years since last setup a multi-DLL application, so memory may be fuzzy.

Design is one common Data.dll that holds all files and classes. Then a DLL that holds some functionality and top of that, The Exe. You can have a number of DLL’s, but try to make sure you group functions in a way that does not make circle references from A.DLL->B.DLL->A.DLL. It is supported, but makes life difficult and can cause instability. Also, if it is one way, you get away with a single compile when you add new procedures.

For each app, you should look at Global Properties, Actions, Tabs General and File Control. The Data.dll is setup to generate all File declarations and External = None External.

The other apps are setup to General → Generate template globals and ABC’s external, linked as DLL, and with File Control External → All External, and All files are declared in another app.

In solution explorer, for each project, you may have to change some settings for Output Type = Exe or DLL and Link Mode=DLL

When you connect apps, you first use Application->Insert Module and select DLL, naming it to whatever dll you have. Then you add procedures and make sure you use External procedure type. Procedure signatures should match 100%, sometimes a slight change can cause GPF because of addressing.

Help | How To’s and Troubleshooting | How to… | Create a .DLL from an APP.

What you can do (and learn form) the DLL Tutor is use it to look at the Global settings in the EXE, Data DLL and other DLLs so you can copy those in your APPs. Plus see how the Data DLL in setup in the EXE.


There were articles in Clarion Mag. I know I wrote one on using Category or organize the move of procedures out of the EXE to a DLL. I have trouble using the ClaMag Search, @GeoffThomson always seems to find stuff.


You could also check on Clarion Live Webinars. Since they made big changes to the site I find it hard to search and filtering. Try this:

  1. Find “ClarionLive! Weekly Webinar” and click on “View 736 Episodes” button
  2. A list of those Webinars opens
  3. In the upper right corner is a Find box, type “DLL” and I get 13, or try “EXE”

Episode 634.00 - Splitting a large exe into 2 apps - https://www.youtube.com/watch?v=7SGFdxtZZYE
Episode 554.00 - Creating a Multi-App Solution - https://www.youtube.com/watch?v=03GaGAiAJYw
Episode 303.00 - Mike Hanson On Multi DLL Project From Single EXE
Episode 213.00 - Mike Hanson_ Break Apart Single EXE App Part2


You have a Single EXE. The first part of the process is straight forward.

  1. Make a Files DLL App configured with all you Files Exported
  2. Change your EXE to use that Files DLL and have all of its Files External
  3. Get that to run
  4. In your Files DLL App add your Accessories setup to be Exported
  5. Change your EXE so your Accessories are setup to be External
  6. Get that to run

Once you have your Single EXE setup with Files as External in a Data DLL then you can start adding more DLLs.

In addition to what others have said the way I do it is similar to Carl.

  1. Create a data.dll that contains all the files and maybe some classes and such.
  2. change the current exe to a dll. That’s just a change in the settings. You also have to change all files and ABC classes to be external. This is the hard bit because you invariably forget something.
  3. create a new exe that is just a shell with the frame and menu that refers to all external procedures. There’s an external template (template only tab) to choose, and you need to add an external module (tools menu) to name the dll.

Once you’ve done it once you’ll get the idea and it’s not hard. :slight_smile:

Multiple DLL exercise - The current state of affairs!
Thank you all for your responses, they are all greatly appreciated.
My present situation is that I have started from scratch, with no previously existing .EXE file. I have created the following:
PT000 This is to be the executable app. - it is simply the MIDI Main Frame template, with the first level menu choices entered with the Menu Editor, and all set as External.
PT001 This is the data DLL and has nothing extra added to it.
PT002 This is a DLL containing any procedures I could identify that might be shared by future DLLs
PT003 This is a DLL containing procedures for Contacts
PT000 has PT001, PT002 and PT003 as External Modules.
PT002 has PT001 (Data DLL) as an External Module
PT003 also has PT001 as an External Module

PT000

Each module has been prepared in it’s own folder as a sub directory of the base folder.


The data dictionary is in the base folder.
I have compiled the DLLs and placed them into the PT000 folder, and have then compiled the PT000.EXE
I am getting a massive amount of errors with a common thread, I appear to be getting duplicated references to the data dictionary from PT002. eg
1 Duplicate Symbol: $GLO:AccessLevel in PT002
2 Duplicate Symbol: $GLO:Activated in PT002
33 Duplicate Symbol: ADDATTRIBUTE@F12XMLGeneratorsbsbsb in PT002
and so on for 3000 plus lines.

I would greatly appreciate any suggestions as to what I am doing wrong.
Thanks

Problem Solved! Many thanks to those who contributed to the success.