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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...