Subject | Re: [IBO] Enhancement Suggestion: Client Libraries |
---|---|
Author | Nando Dessena |
Post date | 2005-07-15T05:35:37Z |
Geoff,
G> Initialization sections are called before we get into the
G> the program itself, which prevents runtime customisation (or
G> at least prevents it from being easy and predictable).
??? Init sections are part of the program; you can read the library
name from the command line, a file or the registry by adding
code to the initialization section of a unit that you put first (or
better right after SysUtils, which will install the first level
exception handler) in your uses clause, so that the init order of your
program is:
System
SysInit
SysUtils
YourUnit
IB_Constants
All the rest
Example (untested):
unit YourUnit;
interface
implementation
uses
IB_Constants;
initialization
if ParamCount > 0 then
IB_Constants.IB_GDS32 := ParamStr(1);
finalization
end.
program YourProgram;
uses
SysUtils,
YourUnit in ...
All the rest;
begin
end.
Ciao
--
Nando Dessena
http://www.flamerobin.org
G> Initialization sections are called before we get into the
G> the program itself, which prevents runtime customisation (or
G> at least prevents it from being easy and predictable).
??? Init sections are part of the program; you can read the library
name from the command line, a file or the registry by adding
code to the initialization section of a unit that you put first (or
better right after SysUtils, which will install the first level
exception handler) in your uses clause, so that the init order of your
program is:
System
SysInit
SysUtils
YourUnit
IB_Constants
All the rest
Example (untested):
unit YourUnit;
interface
implementation
uses
IB_Constants;
initialization
if ParamCount > 0 then
IB_Constants.IB_GDS32 := ParamStr(1);
finalization
end.
program YourProgram;
uses
SysUtils,
YourUnit in ...
All the rest;
begin
end.
Ciao
--
Nando Dessena
http://www.flamerobin.org