The IADsService interface is used to get and set the properties of the Service object. The interface definition is as follows:
[ object, uuid(IID_IADsService), oleautomation, dual ]
interface IADsService: IADsContainer
{
// Read/write properties
[propget]
HRESULT HostComputer ([out, retval]BSTR *pbstrHostComputer);
[propput]
HRESULT HostComputer ([in]BSTR bstrHostComputer);
[propget]
HRESULT DisplayName ([out, retval]BSTR *pbstrDisplayName);
[propput]
HRESULT DisplayName ([in]BSTR bstrDisplayName);
[propget]
HRESULT Version ([out, retval]BSTR *pbstrVersion);
[propput]
HRESULT Version ([in]BSTR bstrVersion);
[propget]
HRESULT ServiceType ([out, retval]long *plServiceType);
[propput]
HRESULT ServiceType ([in]long lServiceType);
[propget]
HRESULT StartType ([out, retval]long *plStartType);
[propput]
HRESULT StartType ([in]long lStartType);
[propget]
HRESULT Path ([out, retval]BSTR *pbstrPath);
[propput]
HRESULT Path ([in]BSTR bstrPath);
[propget]
HRESULT StartupParameters ([out, retval]BSTR *pbstrStartupParameters);
[propput]
HRESULT StartupParameters ([in]BSTR bstrStartupParameters);
[propget]
HRESULT ErrorControl ([out, retval]long *plErrorControl);
[propput]
HRESULT ErrorControl ([in]long lErrorControl);
[propget]
HRESULT LoadOrderGroup ([out, retval]BSTR *pbstrLoadOrderGroup);
[propput]
HRESULT LoadOrderGroup ([in]BSTR bstrLoadOrderGroup);
[propget]
HRESULT ServiceAccountName ([out, retval]BSTR *pbstrServiceAccountName);
[propput]
HRESULT ServiceAccountName ([in]BSTR bstrServiceAccountName);
[propget]
HRESULT ServiceAccountPath ([out, retval]BSTR *pbstrServiceAccountPath);
[propput]
HRESULT ServiceAccountPath ([in]BSTR bstrServiceAccountPath);
[propget]
HRESULT Dependencies ([out, retval]VARIANT *pvServiceDepend);
[propput]
HRESULT Dependencies ([in]VARIANT vServiceDepend);
};
Method | Syntax | Description |
HostComputer | ADsPath | Gets and sets the ADsPath string of the host of this service. |
DisplayName | String | Gets and sets the friendly display name of the service. |
Version | String | Gets and sets the version of the service. |
ServiceType | long | Gets and sets the description of how a service manifests itself on the host computer. Valid values are: Own Process Shared Process Kernel Driver File System Driver Interactive Process The ServiceType is a bit mask that can contain the logical OR of the supported service type constant values. |
StartType | long | Gets and sets when this service starts. Valid values are: Boot System Auto Demand Disabled |
Path | Path | Path and filename to the executable of this service. |
StartupParameters | String | Parameters passed to the service on startup. |
ErrorControl | long | Gets and sets what action that should be taken if this service fails on startup. Valid values are: Ignore Normal Severe Critical |
LoadOrderGroup | String | Name of the load order group that this service is a member of. |
ServiceAccountName | String | Name of the account that this service uses to authenticate itself on startup. |
ServiceAccountPath | ADsPath | ADsPath of the user object for the account that this service uses to authenticate itself on startup |
Dependencies | List | Array of BSTR names of services or load groups that must be loaded in order for this service to load. Uses the following syntax: <DependencyEntry>::="Service:"<ServiceName> |"Group:"<LoadGroupName> |