mierlp Posted January 30, 2013 Share Posted January 30, 2013 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 More sharing options...
mierlp Posted January 31, 2013 Author Share Posted January 31, 2013 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 More sharing options...
nightfury Posted February 1, 2013 Share Posted February 1, 2013 you can placed that code in procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); Link to comment Share on other sites More sharing options...
mierlp Posted February 1, 2013 Author Share Posted February 1, 2013 Hi Thanks for the reply...did change it and works regards Peter Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now