Поделиться через


CAtlServiceModuleT::ServiceMain

This method is called by the Service Control Manager.

void ServiceMain(
   DWORD dwArgc,
   LPTSTR* lpszArgv 
) throw( );

Параметры

  • dwArgc
    The argc argument.

  • lpszArgv
    The argv argument.

Заметки

The Service Control Manager (SCM) calls ServiceMain when you open the Services application in the Control Panel, select the service, and click Start.

After the SCM calls ServiceMain, a service must give the SCM a handler function. This function lets the SCM obtain the service's status and pass specific instructions (such as pausing or stopping). Subsequently, CAtlServiceModuleT::Run is called to perform the main work of the service. Run continues to execute until the service is stopped.

Требования

Header: atlbase.h

См. также

Основные понятия

CAtlServiceModuleT Class

CAtlServiceModuleT Members