mierlp Posted January 30, 2013 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 Quote
mierlp Posted January 31, 2013 Author 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 Quote
nightfury Posted February 1, 2013 Posted February 1, 2013 you can placed that code in procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); Quote
mierlp Posted February 1, 2013 Author Posted February 1, 2013 Hi Thanks for the reply...did change it and works regards Peter Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.