Platform SDK: DLLs, Processes, and Threads

SERVICE_TABLE_ENTRY

The SERVICE_TABLE_ENTRY structure is used by the StartServiceCtrlDispatcher function to specify the ServiceMain function for a service that can run in the calling process.

typedef struct _SERVICE_TABLE_ENTRY { 
  LPTSTR lpServiceName; 
  LPSERVICE_MAIN_FUNCTION lpServiceProc; 
} SERVICE_TABLE_ENTRY, *LPSERVICE_TABLE_ENTRY; 

Members

lpServiceName
Pointer to a null-terminated string that names a service that can run in this service process. This string is ignored if the service is installed in the service control manager database as a SERVICE_WIN32_OWN_PROCESS service type. For a SERVICE_WIN32_SHARE_PROCESS service process, this string names the service that uses the ServiceMain function pointed to by the lpServiceProc member.
lpServiceProc
Pointer to a ServiceMain function.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Header: Declared in Winsvc.h; include Windows.h.
  Unicode: Declared as Unicode and ANSI structures.

See Also

Services Overview, Service Structures, ServiceMain, StartServiceCtrlDispatcher