Platform SDK: Active Directory, ADSI, and Directory Services |
The IADsFileServiceOperations::Resources method gets an indirect pointer to the IADsCollection interface on a collection of the resource objects representing the current open resources on this file service.
HRESULT IADsFileServiceOperations::Resources( IADsCollection ** ppResources );
This method supports the standard return values including S_OK. For other return values, see ADSI Error Codes.
Traditional directory services supply information only about directory service elements that are represented in the underlying data store. Information about resources for file services may not be available from the underlying directory store.
The following Visual Basic® code snippet shows how to enumerate open resources managed by a file service.
Dim fso as IADsFileServiceOperations ' bind to a file service operation on "myComputer" ' in the local domain. Set fso = GetObject("WinNT://myComputer/LanmanServer") ' enumerates resources For Each resource In fso.Resources0 MsgBox "Resource path: " & resource.Path Next resource
For a C++ code snippet using the IADsFileServiceOperations::Resources method, see the code snippet given in IADsResource.
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
Windows 95/98: Requires Windows 95 or later (with DSClient).
Header: Declared in Iads.h.