* this.oResources.AddProperty("NewProperty","value") && this.oResources.NewProperty
* AddProperty(oResources,"NewProperty",value) && this.oResources.NewProperty
* this.oResources.Add("Key","Value") && this.oResources.Item("Key")
* AddProperty(THIS,"NewProperty","value") && this.NewProperty
If you use any of these your COM server does not change and no re-registration should be necessary.
Dear Rick,
in your last "Global Values in Web Connection" web log you said:
"Using wwServer instance properties works and reasonably clean, but if you are running in COM mode, anytime you add a property to your class the ClassIds change for your COM server. This means you have to re-register your COM object on the server, which is a bit of a pain."
So I updated Web Connection to 5.62 version, then moved custom properties in oResources object:
DEFINE CLASS MyAppServer AS WWC_SERVER OLEPUBLIC
...
PROTECTED FUNCTION OnLoad
...
WITH this.oResources
.AddProperty("cProperty1")
.AddProperty("cProperty2")
.AddProperty("cProperty3")
.AddProperty("cProperty4")
ENDWITH
ENDFUNC
So if I add some new property, do I modify the MyAppServer class in MyAppMain.prg file and do I have to re-register my COM object on the server? Is this setting correct?
Also, at the end of same MyAppMain.prg file I initialize settings which must be read from INI file:
DEFINE CLASS BackofficeProcessConfig as wwConfig
cHTMLPagePath = "c:\inetpub\wwwroot\Backoffice\"
cDATAPath = ""
cVirtualPath = "/Backoffice/"
cSetting1=""
cSetting2=""
cSetting3=""
ENDDEFINE
So if I add some new setting in INI file, do I modify the MyAppServer class in MyAppMain.prg file and do I have to re-register my COM object on the server? Is this setting correct?
Thank you very much