共用方式為


CAtlServiceModuleT::Start

Called by CAtlServiceModuleT::WinMain when the service starts.

HRESULT Start(
   int nShowCmd 
) throw( );

Parameters

  • nShowCmd
    Specifies how the window is to be shown. This parameter can be one of the values discussed in the WinMain section.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

The CAtlServiceModuleT::WinMain method handles both registration and installation, as well as tasks involved in removing registry entries and uninstalling the module. When the service is run, WinMain calls Start.

Requirements

Header: atlbase.h

See Also

Reference

CAtlServiceModuleT Class

Other Resources

CAtlServiceModuleT Members