Navigating up from an Enumeration

The enumeration tree can be navigated down from a resource by opening an enumeration upon a resource, as described above. To enumerate up from a resource, the NPGetResourceInformation function is called to obtain information about the resource, followed by the NPGetResourceParent function described below to obtain the name and type of the parents.

NPNetGetResourceInformation should determine if the resource actually is for the network, although it may not be currently accessible or fully valid.

For example: if the resource is \\server\share and dwType specifies a disk, then the provider should ensure that the server server exists on the network, but does not have to validate share. If the resource is \\server\share and dwType is not specified The function should not do purely syntactical checking as this will produce incorrect results when two networks are running on the client and the provider doing syntactic checking is called first.

NPGetResourceParent is typically called for names that were returned by the same NP from a call to NPEnumResource. However, the NP implementation should not assume that the name passed in is valid or references an existing network resource. If the resource syntactically has a parent, then this can be returned, whether or not the parent actually exists. The lpProvider field is filled in by the provider to indicate which behavior the provider is exhibiting. Note, however, the special case where the parent object is the network, where syntactic checking should be avoided if some checking (such as service advertising) can be done to correctly determine the provider.