Platform SDK: Active Directory, ADSI, and Directory Services

IADsFileServiceOperations::Resources

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  
);

Parameters

ppResources
[out] Indirect pointer to the IADsCollection interface that can then be used to enumerate objects implementing the IADsResource interface and representing the current open resources for this file service.

Return Values

This method supports the standard return values including S_OK. For other return values, see ADSI Error Codes.

Remarks

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.

Example Code [Visual Basic]

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

Example Code [C++]

For a C++ code snippet using the IADsFileServiceOperations::Resources method, see the code snippet given in IADsResource.

Requirements

  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.

See Also

IADsFileService, IADsFileServiceOperations, IADsResource