Hi. I am currently building a small DLL (~20 functions so far) project to sit between a larger DLL and a VB project. I am now at a stage where I want some advice before proceeding (I can fairly easily make changes at this stage, but if I continue it will become impossible.)
At the moment, at the DLL entry point to my project, I am calling just a few functions. One of these functions though, leads to another which leads to another and so on. Basically, the whole program executes without functions returning any result to the caller until right at the end (apart from some small functions to check file existence etc.)
The program flow is something like the following:
DLL_Entry
-> Call LoadInternal
-> Call IndexTest
-> Call BreakUpCommand
-> Call ExecuteTest
-> Call Execute Command
-> Call External DLL
This method of calling seems to have produced a fairly fast program execution time, but I am not sure if projects are generally constructed in this way. I feel it would be better if it was structured in such a way that each method returned its result back to the caller, and have a sort of 'central' function handling all calls.
What are your opinions? I'm sure there are other resolutions I haven't thought of. I'm having difficulty finding anything on the web about best practices on program structure.
Thanks in advance.