wntResources2

Itemizes network resources.

(This functions supersedes wntResources.)

Syntax:

wntResources2(net-resource, scope, type, usage, provider)

Parameters:

(s) net-resource: a server UNC (e.g., "\\FredsPC"), a domain (e.g., "SALES"), or the name of a container object with a domain (e.g. "Directory Services"). Cannot be the a network provider. Specify an empty string ("") for the root of the network or the root of the network provider.

(i) scope: see below.

(i) type:  see below.

(i) usage: see below.

(s) provider: name of the network provider under which 'net resource' is located.

Returns:

(s) a tab-delimited list of network resources located immediately below the specified 'net-resource'.

 

Optional Returns:

 

(s)  If you specify blank strings ("") for both 'net-resource' and 'provider', this function will return a tab delimited list of network providers.

(s) If you specify a blank string ("") for net-resource' and a non-blank 'provider', this function will return a tab delimited list of network resources located beneath 'provider'.

 

'Scope' can be one of the following:

Request

Meaning

1

All currently connected resources 

2

All resources on the network 

3

All remembered (persistent) connections 

 

'Type' can be one of the following:

Request

Meaning

0

All resources 

1

All disk resources 

2

All print resources 

3

All disk and print resources 

 

Note: 'net-resource', 'usage', and 'provider' are ignored unless 'scope' is 2. That is, you can itemize all current or persistent connections network-wide, eg:

 

wntResources2("", 1, 0, 1, "")

 

Or you can itemize all available resources under a specific 'net-resource', eg:

 

wntResources2("\\JELLO", 2, 0, 1, "Microsoft Windows Network")

 

But you can not do both at the same time, ie, you can not itemize current connections under a specific 'net-resource':

 

'Usage' can be one of the following:

Request

Meaning

0

All resources 

1

All connectable resources 

2

All container resources 

3

All connectable and container resources 

 

Note: A "connectable" object is an object that can be connected to, such as a directory or a printer. A "container" object is an object that contains other objects, such as a domain or a server.

 

'Provider' is the name of the network provider under which 'net-resource' is located. Most commonly 'provider' is "Microsoft Windows Network" (for Windows NT) or "NetWare Services" (for NetWare).

 

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

;;examples for the different types of resources. providers = wntResources2("", 2, 0, 2, "") domains = wntResources2("", 2, 0, 2, "Microsoft Windows Network") servers = wntResources2("OFFICE", 2, 0, 2, "Microsoft Windows Network") shares = wntResources2("\\SERVER", 2, 0, 1, "Microsoft Windows Network") Exit
See Also:

WntResources