Using Delphi Alexandria and RemObjects with TRoIndyHttpServer and TRoHttpApiDispatcher configured as below:
// when server starts... FRoServerWeb := TRoIndyHttpServer.Create(nil); FROHttpApiDispatcher := TRoHttpApiDispatcher.Create(nil); FROHttpApiDispatcher.Path := '/'; FROHttpApiDispatcher.Server := FRoServerWeb; FROServerWeb.Port := 12000; FROServerWeb.Active := True;
It works well.
In order to modify its setup remotely, I’ve put other TRoIndyHttpServer component in this project listening to a different port and created another project in order to connect to this server and modify the FRoServerWeb configuration.
So, I can control it remotely.
The problem is when I stop and start FRoServerWeb (to allow setup changing take place).
It complains with the following error: “EOleSysError - COInitialize was not called” when I set FRoServerWeb.active := true
I have uROComInit in the project and it is the first unit of the project as required.
Is there a way to stop and start this server remotely without this error?