| Previous | Next |
| ERROR_BAD_PROFILE | ERROR_EXTENDED_ERROR |
ERROR_NOT_CONTAINER
The WNet resource hierarchy distinguishes containers from connectable resources. WNetOpenEnum starts enumeration at the root when passed NULL or at a NETRESOURCE that represents a container; WNetEnumResource then returns child NETRESOURCE entries. A share or leaf resource is not automatically a container simply because it has a network name.
Check the dwUsage information returned by resource enumeration or information APIs. RESOURCEUSAGE_CONTAINER indicates that the resource can be opened for enumeration. Do not recursively call WNetOpenEnum for every connectable leaf returned by WNetEnumResource.
Enumeration contract
- Inspect NETRESOURCE.dwUsage before descending into a resource.
- Start at the network root with NULL when broad enumeration is intended.
- Keep RESOURCEUSAGE_CONNECTABLE separate from RESOURCEUSAGE_CONTAINER.
- Preserve the provider and resource type because different providers expose different hierarchies.
WNetOpenEnum · WNetGetResourceInformation
Looking for a different code? Search another status or error code.
