AttachService
(
ServiceName As String,
[ServiceComputer] As Variant,
[LookupComputer] As Variant
);
Parameters
[in] String ServiceName
Name of the service to be attached. Note that the name of the
service might be different from the display name of the service.
For example, the Windows "ClipSrv" has the display name "ClipBook
Server".
[in] Variant ServiceComputer
Name of the Windows computer where the service is running. This is
an optional parameter. If this parameter is not specified, the
service is assumed to be running on the current computer.
[in] Variant LookupComputer
Name of the computer to be used to find account names of users and
groups. This is an optional parameter. By default, the current
domain's DC (Domain Controller) and then the local computer are
used to find users and groups.
Description
Initializes the object with the service on which operations are to
be performed. This method has to be called before any other methods
of IServiceObjectSecurity can be called.
Example
Dim ServiceSecurity As IServiceObjectSecurity
Set ServiceSecurity =
CreateObject("DirectScript.ObjectSecurity")
'Attach to the messenger service on the computer "Moon".
ServiceSecurity.AttachService "messenger", "Moon"
See Also