************************************************************* DEFINE CLASS CompactServer AS Custom OLEPUBLIC ************************************************************* oProxy = null FUNCTION Init() *** Load configuration settings so we can dynamically *** create our 'real' Web Connection server loConfig = GetConfigData() *** Must set Procedure to the main .APP file first *** Otherwise DLL/EXE servers won't find the APP file contents properly SET PROCEDURE TO (loConfig.AppFileName) *** Have to do this so VFP comiler doesn't pull in wconnect.prg into this project *** This is the loader that does a bunch of SET PROCEDURE TO lcCmd = "DO wconnect.prg in '" + loConfig.AppFileName + "'" &lcCmd *** Create an instance of the server class to allow *** GetProcessId/ProcessHit proxying this.oProxy = NEWOBJECT(loConfig.ServerClassName,loConfig.AppFileName) ENDFUNC FUNCTION GetProcessId(lnInstance) RETURN this.oProxy.GetProcessId(lnInstance) ENDFUNC FUNCTION ProcessHit(lcRequestBuffer,llFile, loAspNetContext) RETURN this.oProxy.ProcessHit(@lcRequestBuffer,llFile,loAspNetContext) ENDFUNC ENDDEFINEIs this behavior documented anywhere? I would have never thought to SET PROCEDURE wcDemo.app since there's no code in the mainline there.
set procedure to ricks.app additive>
>>FUNCTION Init() >> >>*** Load configuration settings so we can dynamically >>*** create our 'real' Web Connection server >>loConfig = GetConfigData() >> >>*** Have to do this so VFP comiler doesn't pull in wconnect.prg into this project >>*** This is the loader that does a bunch of SET PROCEDURE TO >>lcCmd = "DO wconnect.prg in '" + loConfig.AppFileName + "'" >> >>LogString(lcCmd) >> >>*** THIS IS WHAT FAILS - WCONNECT.PRG NOT FOUND >>*** loConfig.AppFileName is a full valid path to the .app file >>&lcCmd >> >>*** If I comment the above out - the NewObject() fires but then fails because >>*** it doesn't have the necessary dependencies for base classes etc. >>*** This needs to have the SET PROCEDURE TO etc. loaded >>this.oProxy = NEWOBJECT(loConfig.ServerClassName,loConfig.AppFileName) >> >>ENDFUNC >>>>