IADsFileServiceOperations interface (iads.h)
The IADsFileServiceOperations interface is a dual interface that inherits from IADsServiceOperations. It extends the functionality, as exposed in the IADsServiceOperations interface, for managing the file service across a network. Specifically, it serves to maintain and manage open resources and active sessions of the file service.
The IADsFileServiceOperations interface has these methods.
The IADsFileServiceOperations::Resources method gets a pointer to a pointer to the IADsCollection interface on a collection of the resource objects representing the current open resources on this file service.
The IADsFileServiceOperations::Sessions method gets a pointer to a pointer to the IADsCollection interface on a collection of the session objects that represent the current open sessions for this file service.
To bind to a file service operations object, use the ADsPath string that identifies the "LanmanServer" service on the host computer, as shown in the following code example.
Dim fso As IADsFileServiceOperations
On Error Resume Next
' Replace aDomain with the domain that the computer is located on.
' Replace aComputer with the name of the computer.
Set fso = GetObject("WinNT://aDomain/aComputer/LanmanServer")
From this point, you can handle the file service object as just a service object, applying any of the methods of IADsServiceOperations to the file service object. For example, you can examine the operational status of the file service, start or stop the file service, or change its password.
However, the IADsFileServiceOperations interface allows you to work with open resources and active sessions of the file service. See the following example.
For Each r in fso.Resources
|Minimum supported client
|Minimum supported server
|Windows Server 2008