Export (0) Print
Expand All
2 out of 3 rated this helpful - Rate this topic

IADsFileShare interface

The IADsFileShare interface is a dual interface that inherits from IADs. It is designed for representing a published file share across the network. Call the methods on IADsFileShare to access or publish data about a file share point.

Members

The IADsFileShare interface inherits from IDispatch and IADs. IADsFileShare also has these types of members:

Methods

The IADsFileShare interface has these methods.

MethodDescription
Get

Gets the value for a property by name.

GetEx

Gets the value for a single or multi-valued property by name.

GetInfo

Loads the property values of this object from the underlying directory store.

GetInfoEx

Loads specific property values of this object from the underlying directory store.

Put

Sets the value for a property by name.

PutEx

Sets the value for a single or multi-valued property by name.

SetInfo

Persists the changes on this object to the underlying directory store.

 

Properties

The IADsFileShare interface has these properties.

PropertyAccess typeDescription

MaxUserCount

Read-only

Gets the maximum number of users allowed to access share at any one time.

AdsPath

Read-only

Gets the object's ADsPath that uniquely identifies this object from all others.

Class

Read-only

Gets the name of the object's schema class.

CurrentUserCount

Read-only

Gets the current number of users connected to this share.

Description

Read/write

Gets and sets the description of the file share.

GUID

Read-only

Gets the GUID of the object as stored in the underlying directory store.

HostComputer

Read/write

Gets and sets the ADsPath reference to the host computer.

Name

Read-only

Gets the object's relative name.

Parent

Read-only

Gets the ADsPath string for the parent of the object.

Path

Read/write

Gets and sets the file system path to shared directory.

Schema

Read-only

Gets the ADsPath string to the schema class object for this object.

 

Remarks

IADsFileShare is supported by WinNT and NWCOMPAT system providers only. Using the WinNT provider, you can also bind to a FPNW share by substituting "FPNW" for "LanmanServer" in the code examples below.

To bind to a file share, using the WinNT system provider, you can explicitly bind to the file service "LanmanServer" on the host machine, and then enumerate the container to reach the file share of interest, or bind directly to the file share.

Examples

The following code example demonstrates how to bind to the file service and enumerate the container to display the names of the shares in that container.

Dim fs as IADsFileService
Dim share As IADsFileShare
On Error GoTo Cleanup

Set fs = GetObject("WinNT://aComputer/LanmanServer")

For Each share In fs
    MsgBox("Share: " & share.name)
Next share

Cleanup:
    If (Err.Number<>0) Then
        MsgBox("An error has occurred. " & Err.Number)
    End If
    Set fs = Nothing
    Set share = Nothing

The following code example demonstrates how to bind directly to a file share.

Dim fs as IADsFileShare
On Error Resume Next
Set fs = GetObject("WinNT://aComputer/LanmanServer/_file_share_name_")

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Iads.h

DLL

Activeds.dll

IID

IID_IADsFileShare is defined as EB6DCAF0-4B83-11CF-A995-00AA006BC149

See also

IADsFileShare Property Methods

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.