Jump to content

Load serverModule settings


mierlp

Recommended Posts

hi

 

i would like to load uniServerModule setting from a .ini file like the message for

a invalid session.

 

Is load the .ini file settings at uniServerModule.OnCreate but

the custom message will not be displayed only the defautl messages

Link to comment
Share on other sites

SOLVED

 

I needed to use :

 

 

 

procedure UniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
var  
   IniFile : TIniFile;begin
   //Assign here my variables like
   ServerPort           :=IniFile.ReadString('SERVER', 'Port', 'Default');   
   ServerAllowMultiIP   :=IniFile.ReadString('SERVER', 'AllowMultiIP', 'Default');   
   ServerLoadingMessage :=IniFile.ReadString('SERVER', 'LoadingMessage', 'Default');
end; 

 

 

You may NOT call a other procedure in this BeforeInit to assign variables like this...(then you got a error)

 

procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
begin
   // Call here a other procedure to assing the variables   
   AssigVariables
;end;
 

 

 

 

Regards Peter

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...