` Printed Icetips Article

Icetips Article



Par2: Data DLL without extranious exports
2014-01-04 -- Sandro Gasparetto
 
I think I found a viable solution .

1 - open the Base.app
2 -  go to Global Properties --> Actions ----> Global Objects , then
check "don't generate globals"
3 - open the next tab : Classes
  click on the button "ABC Library Files" , ckeck "override defaults"
, then "location of ABC library" = none

This way the Base.app compiles *without* all the ABC stuff, and there
are no globalrequest/globalresponse inside.

The resulting .Dll is very tight , but obviously is not possible to
use any of the ABC facilities......
This means .... Every procedure inside the Base.app must be of a
"source" kind, and if ever there is a need of a Window, this windows
has to be coded by hand (in the data section) , and the management
must be done via Open(window), display(), ACCEPT , case accepted() ...
and so on.  All written in source code  :-(

There is more .... when all these "Base" procedures need to be used,
the procedures don't have to be included in the application tree, as
usually we do.  But they need to be  defined "Inside the global map",
just as if they were written in another language !

the correct definition (inside the global map) looks like :
 Module('Base.dll')
Assoc(*Cstring),Name('ASSOC@FRsc') 
BarCode128(string),string,Name('BARCODE128@Fsb')
Counter(STRING pCounterName),LONG,Name('COUNTER@Fsb') 
            ErrHandler(,<*file>),Name('ERRHANDLER@FOsBf')

MakeFilter(*view,*key,,,,,,),Name('MAKEFILTER@FBiBkOuOuOuOuOuOu')
! and so on ....................
 end

Apart from that, everywhere else the code remains the same
I.E. : the "base" procedures are called in the usual way. No changes. 
And it works !



Printed November 23, 2024, 3:41 am
This article has been viewed/printed 35232 times.