Can We use dcu (Delphi compiled unit) at runtime?

1.7k Views Asked by At

Can we use dcu an runtime like dll? For example, show form that compiled in dcu file. I have the question because i want to develop plugginable application. As Delphi programmer, as far as i know, i just have two options to do this, dll based or bpl based. I like dll based because it does not depend to delphi version, but.. save form to few dll, make each dll have a big size and its total size is bigger than single .exe extremely. Using bpl, it depends on Delphi version that compiled both bpl and exe.

Or can somebody explain a trick or strategy so can make .dll that save form become as small as possible? Thanks!

3

There are 3 best solutions below

0
On

DCU's are only compiled units (hence the name) they are used to build an exe/dll through the Linker.

0
On

No you can't directly access DCU files from runtime :(

It was pretty common practive to store Delphi forms in DLLs, Google should be able to throw up quite a few examples.

Delphi Dll - more than one Form / unit in one dll

http://www.link-rank.com/dll.htm

http://en.allexperts.com/q/Delphi-1595/2008/6/Call-procedure-DLL-Form.htm

http://www.blitzbasic.com/Community/posts.php?topic=54261

HTH

0
On

As far as I know, you cannot access .dcu-s at runtime. Better use DLLs.