(2015-09-28 22:19:06)
群友写的解决uniGUI试用版限制修改SessionTimeOut,思路很精巧,贴过来分享,感谢朋友的奉献。当然,如果真正用uniGUI实做项目,买份正版是正道!
var UniServerOption, newUniServerOption : TUniServerOptions; n : Integer; begin UniServerOption := UniServerModule.Options; pAddr := @UniServerModule.Options; newUniServerOption := [soShowLicenseInfo, soAutoPlatformSwitch, soDisableBrowserCompatibilityMessage, soRestartSessionOnTimeout, soAllowSessionRecording]; n := Byte((@newUniServerOption)^); PInteger(pAddr)^ := n; UniServerOption := UniServerModule.Options; end;
对于在ide中修改无效的属性是因为代码中只有getxxx而没有了setxxx 可按上面的方法自行脑补
var UniServerOption, newUniServerOption : TUniServerOptions; n : Integer; begin UniServerOption := UniServerModule.Options; pAddr := @UniServerModule.Options; newUniServerOption := [soShowLicenseInfo, soAutoPlatformSwitch, soDisableBrowserCompatibilityMessage, soRestartSessionOnTimeout, soAllowSessionRecording]; n := Byte((@newUniServerOption)^); PInteger(pAddr)^ := n; UniServerOption := UniServerModule.Options; end;
对于在ide中修改无效的属性是因为代码中只有getxxx而没有了setxxx 可按上面的方法自行脑补