Re:Unit files
Sel?uk,
Quote
> Are the Unit files autocreated like main form?
I'm not sure I understand that question. The only units that are
autocreated are those used by VCL forms and that's because they start
off with some base definitions and declarations.
Other units are created when you ask the Project Manager to create
them.
Quote
> Is there performance difference between defining functions in >
> Dll and defining functions in unit files in EXe ?
Not inherently <s>.
By that I mean that if you time the actual CPU instruction you won't
see any difference. Once the DLL has been loaded it shares the same
address space and stack as the EXE's code so each can access the
other's code and data as easily as their own.
However:The nature of DLL design/implementation is such that
sometimes you have to do more work than you would if you weren't
using the DLL. The work is carried out at the same speed regardless
but obviously if there is more work being performed then it may
impact overall application performance.
As an example of this it can be problematical to export objects from
a DLL. Consequently a lot of people often have the DLL/EXE
communicate through a handle instead. This may introduce an
additional performance penalty if the DLL has to perform a look-up
operation on the handle instead of being able to dereference it
directly.
Andrue Cope
[Bicester, UK]