Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


SvcWaitForCmd User Commands

 Keywords:  SvcWaitForCmd User Command Commands

Question:

Could you please explain the following lines from the 'Run as a Native Service' script example in the WinBatch help file.
SERVICE_CONTROL_USER128=28 ;User command 128
SERVICE_CONTROL_USER129=129 ;User command 129
SERVICE_CONTROL_USER130=130 ;User command 130
SERVICE_CONTROL_USER131=31 ;User command 131
SERVICE_CONTROL_USER255=255 ;User command 255

Answer:

Services have the capability of accepting up to 128 different application-defined commands. Windows calls these "user" commands in the sense that an user-written servcice is a "user" (and not the person) Thus you can write a Winbatch service to "listen" to user defined commands.

The wntSvcControl function can send these commands to a service.