06-25-2025, 05:41 PM
Hi,
Finally I found the solution. Root cause was the Application Working directory: when running in mode Service, must be changed using this code:
procedure TIWServerController.IWServerControllerBaseCreate(Sender: TObject);
var
Path: array[0..MAX_PATH] of Char;
ExtractedPath: string;
I: Integer;
begin
GetModuleFileName(HInstance, Path, SizeOf(Path));
ExtractedPath := string(Path);
I := LastDelimiter('\', ExtractedPath);
if I > 0 then
ExtractedPath := Copy(ExtractedPath, 1, I - 1);
SetCurrentDir(ExtractedPath);
Pool.Active := True;
end;
With this change, everything works as expected.
KR,
Venancio Lasquibar
Finally I found the solution. Root cause was the Application Working directory: when running in mode Service, must be changed using this code:
procedure TIWServerController.IWServerControllerBaseCreate(Sender: TObject);
var
Path: array[0..MAX_PATH] of Char;
ExtractedPath: string;
I: Integer;
begin
GetModuleFileName(HInstance, Path, SizeOf(Path));
ExtractedPath := string(Path);
I := LastDelimiter('\', ExtractedPath);
if I > 0 then
ExtractedPath := Copy(ExtractedPath, 1, I - 1);
SetCurrentDir(ExtractedPath);
Pool.Active := True;
end;
With this change, everything works as expected.
KR,
Venancio Lasquibar

