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.
| Method | Description |
|---|---|
| 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.
| Property | Access type | Description |
|---|---|---|
|
Read-only |
Gets the maximum number of users allowed to access share at any one time. | |
|
Read-only |
Gets the object's ADsPath that uniquely identifies this object from all others. | |
|
Read-only |
Gets the name of the object's schema class. | |
|
Read-only |
Gets the current number of users connected to this share. | |
|
Read/write |
Gets and sets the description of the file share. | |
|
Read-only |
Gets the GUID of the object as stored in the underlying directory store. | |
|
Read/write |
Gets and sets the ADsPath reference to the host computer. | |
|
Read-only |
Gets the object's relative name. | |
|
Read-only |
Gets the ADsPath string for the parent of the object. | |
|
Read/write |
Gets and sets the file system path to shared directory. | |
|
Read-only |
Gets the ADsPath string to the schema class object for this object. |
Remarks
IADsFileShare is supported by WinNT system provider 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 Vista |
|---|---|
|
Minimum supported server |
Windows Server 2008 |
|
Header |
|
|
DLL |
|
|
IID |
IID_IADsFileShare is defined as EB6DCAF0-4B83-11CF-A995-00AA006BC149 |
See also