Services.exe Request Handling

Once a connect request has been received for a socket that has a particular service bound to it, Services.exe automatically calls the accept function and retrieves a connection socket. The retrieved socket is then passed to the service's exported xxx_IOControl function for handling. The second parameter of this function, dwCode, is set to IOCTL_SERVICE_CONNECTION and the socket is passed in the third parameter, pBufIn. Services.exe will not close this socket. It is the service's responsibility to do this, even in the case that xxx_IOControl returns an error. Care must be taken to ensure that the socket is always closed inside the service.

Once a service handles an accepted socket using xxx_IOControl, the entire super services thread is blocked. The service should create a thread to handle a given request.

See Also

Super Services | accept | xxx_IOControl

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.