Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to split a big C++Builder application in DLLs (w/ TForms)

6 views
Skip to first unread message

gg_f...@hotmail.com

unread,
Aug 25, 2008, 4:53:53 PM8/25/08
to
Dear All,

I've developed an CRM application based on C++ Builder 6 and Firebird
1.5+. It's a good application but now it needs some improvements.
I'm planning to add features like PIM (based on MS-Outlook), Piracy
protection, Skin features, etc. The actual version (1.3.1) is an MDI
application with 8 MDIChild forms and other 53 normal style forms and
a total of 126 .cpp files and everything is compiled with 1 project.
My actual project have a SQL_Data_Module and the FormMain form as base
with all menus and from that point all other funcionts/forms are
called using
the simple method of TFormXYZ *_myForm = new TFormXYZ(Application); As
MainFormFile.cpp has all include headers typed in MainFormFile.h,
everything compiles
beautiful and as all 61 forms have a line container '#include
"SQL_DataModuleFile.h"' as well as '#include "MainFormFile.h', my
problem starts
when I need to do some changes. My C++ Builder compiles everything
again. It sucks. If I want to test a new component, to change
something or even
to develop a new feature that I dont know whether it will work or not,
I need to recompile up to 20 times and each time is the same tragic
situation: 10 to 20 minutes compiling.

So, I was trying to find out if there is a way to split my big
application (17MB.exe) in 5 or 10 smallers. For example,
let's suppose a very small application (500kb) with several DLLs like
DataModule.dll, CRM.dll, Orders.dll, Suppliers.dll,
Invoices.dll, MyUDF.dll,etc. I would to recompile and redistribute the
only DLL that has been changed/recompiled.

Well, from this point my problem starts:

* I dont know how to export a TForm class from a DLL neither send the
Application->Handle to it.
* I have 4 dlls already where 3 dlls are resources dll (images,skins
and sql commands) and one more of simple math and file functions (not
vcl) made in C and exported with simple extern "C" but it doesnt use
classes neither forms (actually the only dll the I've effectively
gotten to work).
* Other issue I didn't solve is how to pass the pointer of IBDatabase
+ TTransaction to the DLL to share the same DB connection?
* Altough I've seen something similar for Delphi, definitely C++ is
different of Pascal.

I really appreciate any kind of hint, tip, and/or help.

Thank you,

George.

0 new messages