The CreateServiceForApplication method creates an NT service associated with the specified COM+ application.
A service created by this method can be removed using the DeleteServiceForApplication method.
HRESULT CreateServiceForApplication( BSTR bstrApplicationIDOrName, BSTR bstrServiceName, BSTR bstrStartType, BSTR bstrErrorControl, BSTR bstrDependencies, BSTR bstrRunAs, BSTR bstrPassword, VARIANT_BOOL bDesktopOk );
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
For an explanation of the requirement values, see Requirements (Component Services).
Platforms: Windows XP, Windows Server 2003
Header: Declared in comadmin.h
Library: Included as a resource in comadmin.dll