I have seen a few posts requesting information about this, so here is a brief runthrough of what happens when you click the "Compile" button in the IDE.
1. The IDE collates all of the source code from the main source file and all includes in the project into one source file (usually named _temp.dba or similar). Any preprocessing by editor plugins will be done during this stage.
2. The IDE updates the .dbpro project file. The .dbpro project file is a simple series of key-value pairs, eg. "executable=myapp.exe". Each setting in the IDE usually has one associated key-value pair in the project file. If you open one in Notepad, you'll see that it is mostly self-explanatory.
The "version=DBP1.0.0" entry must be at the top of the file, but otherwise the items can be in any order.
3. A key called "final source" is added to the .dbpro file, where the value is the location of the temporary source file containing all of the project's source code.
4. The compiler (DBPCompiler.exe) is executed, and the path to the .dbpro file is passed on the commandline. Ie. "DBPCompiler.exe <path_to_dbpro_file>"
5. The compiler will create a file in memory called "DBPROEDITORMESSAGE" which allows the IDE to keep track of what the compiler is up to, this can be opened using the OpenFileMapping Windows API command. The first four bytes of this file contain the current line number which the compiler is working on. To get these bytes from the file, call MapViewOfFile to prepare a section of the file for reading, and then use CopyMemoryRead to copy the relevant bytes.
Compilation occurrs in 4 stages (3 parsing stages, then a linking stage). The counter resets after each stage.
Following the first four bytes, there is a null-terminated string (A normal char* string) which contains other progress information.
Note however, that this information is ONLY sent if the compiler can find a windows whoose class name is "TDBPROEDITOR". If it doesn't find that window, it won't create the memory file.
6. The compiler will terminate either due to an error, or when compiling is complete. If it fails due to an error, it will send a WM_USER message to the window with class name "TDBPROEDITOR". A short summary of the error is passed as a string in the DBPROEDITOMESSAGE file (note that the first four bytes are no longer the progress counter, so the null terminated error string starts from the first byte in the file). If compilation is successful, no WM_USER message is sent, and the IDE is responsible for detecting when the compiler closes.
7. The IDE is then responsible for launching the newly-minted program executable.
BlueGUI Windows Plugin