Directory Services |
The IADsResource interface is a dual interface that inherits from IADs. It is designed to manage an open resource for a file service across a network.
The IADsResource interface inherits the methods of the standard COM interfaces:
In addition, IADsResource defines the following methods.
Method | Description |
---|---|
get_User | Gets the name of the user for the resource. |
get_UserPath | Gets the ADsPath of the user object for the user who opened the resource. |
get_Path | Gets the file system path of the opened resource. |
get_LockCount | Gets the number of locks on the resource. |
The IADsResource interface defines the following properties. The preceding table includes access methods for these properties.
Property | Description |
---|---|
LockCount | Gets the number of locks on the resource. |
Path | Gets the file system path of the opened resource. |
User | Gets the name of the user for the resource. |
UserPath | Gets the ADsPath of the user object for the user who opened the resource. |
When a remote user opens a folder or a subfolder on a public share point on the target computer, ADSI considers this folder to be an open resource and represents it with a resource object that implements this interface.
The following code example shows how to obtain the collection of resource objects from a file service operations object.
Dim fso as IADsFileServiceOperations Dim rs as IADsCollection On Error GoTo Cleanup Set fso = GetObject("WinNT://myHost/LanmanServer") Set rs = fso.Resources Cleanup: If (Err.Number<>0) Then MsgBox("An error has occurred. " & Err.Number) End If Set rso = Nothing Set rs = Nothing
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.