wntDfsGetInfo

Gets information about a specific DFS links.

Syntax:

wntDfsGetInfo( DFS Path )

Parameters:

(s) DFS Path A DFS entry path name. See below for more information.

Returns:

(arr) A single dimensional array containing DFS link configuration information.

 

This function obtains configuration information for the specified DFS entry path name. The value of the DFS Path parameter must be in one of the following formats:

 

The first form is as follows:

\\Dfsname\sharename\path_to_link

where DFS name is the name of the storage server that hosts the root of a stand-alone DFS implementation; share name is the name of a shared folder that is published on the DFS host server; and path_to_link specifies the path on the physical network share.

 

The second form is as follows:

\\DomainName\DomDfsname\path_to_link

where DomainName is the name of the domain that hosts the DFS root; DomDfsname is the name of the root of a domain-based DFS implementation published in the domain's directory service; and path_to_link specifies the path on the physical network share.

 

The return value is a single dimensional array containing multiple items of configuration information for the specified link and each one of its storage targets. The array is structured as follows:

 

Result[x]

Meaning

0

(s) the name of the DFS entry path. In a domain DFS environment, it is possible to pass in a DFS Path parameter value that includes a server name, and the value in this element of the array will be the proper DFS entry path name that contains the domain name.

1

(s) the comment associated with the DFS entry path

2

(i) the volume state of the DFS entry path

1 = OK
2 = Inconsistent
3 = Offline
4 = Online

3

(i) the # of storage targets associated with the DFS entry path.

4

(s) a @TAB delimited list of field delimited records containing information about each storage target associated with the DFS entry path. The following format applies to the field delimited records:

 

<storage-state>|<server-name>|<share-name>

 

where <storage-state> is one of the following:

 

1 = Offline
2 = Online
4 = Active

where <server-name> is the name of the server that hosts the storage target

 

where <share-name> is the name of the share on <server-name>

 

There will be one of these records in the @TAB delimited list for each storage target.

 

5

(i) Timeout for the DFS entry path. This element only contains a valid numeric value when wntDfsGetInfo() is called on a Win2K or newer system. On WinNT v4.0, this element will contain an empty string instead.

6

(s) GUID for the DFS entry path. This element only contains a valid GUID string when wntDfsGetInfo() is called on a Win2K or newer system. On WinNT v4.0, this element will contain an empty string instead.

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

DFSname = "\\computer" dsflist = wntDfsList( DFSname ) DFSPath = AskItemlist("DFS link names",dsflist,@TAB,@UNSORTED,@SINGLE) If DFSpath == "" Then Exit infoarray = wntDfsGetInfo( DFSPath ) title = infoarray[0]; DFS entry path. comment = infoarray[1]; comment Switch infoarray[2] ; volumestate    Case 1       volumestate = "OK"       Break    Case 2       volumestate = "Inconsistent"       Break    Case 3       volumestate = "Offline"       Break    Case 4       volumestate = "Online"       Break EndSwitch numstoretarg = infoarray[3] ;# of storage targets storetargetinfo = infoarray[4] ;a @TAB delimited list of information about each storage target. format = "" For x = 1 To numstoretarg    item = ItemExtract(x,storetargetinfo,@TAB)    state = ItemExtract(1,item,"|")    Switch state       Case 1          state = "Offline"          Break       Case 2          state = "Online"          Break       Case 4          state = "Active"          Break    EndSwitch    serv = ItemExtract(2,item,"|")    share = ItemExtract(3,item,"|")    format = StrCat(format,@CRLF,"State = ",state," Servername = ",serv," Sharename = ",share,@CRLF) Next timeout = infoarray[5]; Timeout GUID = infoarray[6] ;GUID msg = StrCat("Comment:",@TAB,comment,@CRLF,"Volume state:",@TAB,volumestate,@CRLF,"# of targets:",@TAB,numstoretarg,@CRLF) msg = StrCat(msg,@CRLF,"Storage Target Info:",@TAB,format,@CRLF,"Timeout:",@TAB,timeout,@CRLF,"GUID:",@TAB,GUID) Message(title,msg) Exit
See Also:

About DFS, wntDfsList