[AWS] AWS as a service on a Win2000 server

anders.wirzenius@wartsila.com anders.wirzenius@wartsila.com
Tue, 20 Jan 2004 09:27:59 +0200


> -----Original Message-----
> From: David Marceau [mailto:davidmarceau@sympatico.ca]=20
> The weird thing about nt services is that if you create a dll=20
> with too much housekeeping at the load time, the dll will not=20
> return immediately and as a result your dll will give the=20
> appearance that it failed to load and you end up with an hour=20
> glass Icon.
>=20
> nt service success trick #1
> ----------------------------
> Don't do any initialization at load time.  Have some timer=20
> actually initialize your application after 5 seconds.  That=20
> will give windows the chance to behave properly and return=20
> success for DLL_INIT...  In fact the ideal is that you just=20
> return success in the DLL_INIT part right away. There should=20
> be about three lines.=20
> 1)load dll but don't do any init.=20
> 2)set a timer with a callback that in 5 seconds it will init=20
> and start aws=20
> 3)return success.

There must be something fundamental that I don=B4t do right.=20
I get the same error message:
"The service did not respond to the start or control request in a timely =
fashion."
even with the following program:

procedure Service_Test is
begin
   loop
      null;
   end loop;
end Service_Test;

instsrv anders C:\..\service_test.exe

net start anders


Anders