Hello,
I am using the SvCom library to develop windows services.
On Delphi 11.3 with target platform Win32 it works, but I am unable to let services run with target platform Win64.
On Delphi 10.4 everything worked fine.
I checked source code of the library and It seems that nothing significant has changed between the two versions.
The problem is that, when the service starts, an error is being displayed on svCom window (No exception is raised):
SetServiceStatus: hServiceStatus is invalid
Then the service just stop.
The code that should set service status, and that return the error is the following:
const PSvSetServiceStatus: Pointer = nil;
function SvSetservicestatus;
asm
call InitNTServiceDebug
{$IFDEF CPUX64}
Mov rax, qword PTR [PSvSetServiceStatus]
test rax,rax
Jz SetServicestatus
Jmp dword64 Ptr [PSvSetServiceStatus]
{$ELSE}
Pop EBP
Cmp DWORD Ptr [PSvSetServiceStatus],$00
JZ SetserviceStatus
jmp DWORD Ptr [PSvSetServiceStatus]
{$ENDIF}
end;
I also tried to contact the support of this library but received no reply
Do you know how this could be fix?
Thanks