In article <8t9lbu$ml1$1@nnrp1.deja.com>, Ted Dennison writes: > In article <8t8u9l$4ru$1@zingo.tninet.se>, > "Peter Hend�n" wrote: >> I am doing an overhaul of a Windows NT service. It is >> currently done in C++. I now have a (very tight) time >> window to convince the powers that be to let me rewrite >> this in Ada (I did the original C++ implementation). What >> I would like some help with is how to implement an NT >> service (the service module handler stuff) - sample/boilerplate > > Hmmm. There's a nice little discussion of that on the MDSN disk that > should have come with your C++ compiler: "Design a Windows NT Serice..." > in Periodicals 1997. It looks pretty simple. You just need to create a > ServiceMain and Handler routine (with the proper parameter profiles of > course) for each service in your program. If your executable is listed > in the registry as containing a service, the OS calls your main > procedure at startup to perform initialization. As part of that > initialization your main procedure builds a LPSERVICE_TABLE_ENTRY array > containing the name and ServiceMain address for each service in the > executable. You then pass that to StartServiceCtrlDispatcher (You have > to do this within 2 minutes, or the OS will kill your process). Wasn't this the area with a problem letting the Ada RTL know about threads created by the Microsoft OS code ?