typedef struct _NETRESOURCE {
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPTSTR lpLocalName;
LPTSTR lpRemoteName;
LPTSTR lpComment;
LPTSTR lpProvider;
} NETRESOURCE, *LPNETRESOURCE;
RESOURCE_CONNECTED - a network resource that is currently connected or persistent (i.e., returns WN_SUCCESS from WNetGetConnection). | |
RESOURCE_GLOBALNET - a network resource (may or may not be connected). | |
RESOURCE_REMEMBERED - a persistent connection. | |
RESOURCE_RECENT - a recently connected remote resource. | |
RESOURCE_CONTEXT - the resources associated with the user's current and default network context. |
RESOURCETYPE_DISK
RESOURCETYPE_PRINT
RESOURCETYPE_ANY
The value RESOURCETYPE_ANY is used if the resource matches more than one (e.g., a container of both print and disk resources), or a resource which is neither print or disk.
RESOURCEDISPLAYTYPE_ROOT | The root of networks |
RESOURCEDISPLAYTYPE_NETWORK | a network |
RESOURCEDISPLAYTYPE_DOMAIN | collection of servers |
RESOURCEDISPLAYTYPE_SERVER | a server |
RESOURCEDISPLAYTYPE_SHARE | a share point RESOURCEDISPLAYTYPE_SHAREADMIN - an administrative share point |
RESOURCEDISPLAYTYPE_DIRECTORY | a directory |
RESOURCEDISPLAYTYPE_GENERIC | unspecified |
The field is a bit mask which may contain any of:
RESOURCEUSAGE_CONNECTABLE | Can connect to resource by a call to WNetAddConnection or WNetAddConnection2. If dwType is RESOURCETYPE_DISK, then, once the resource is connected to, the file APIs (e.g., FindFirstFile, FindNextFile) can be used to enumerate any files and directories contained within it. |
RESOURCEUSAGE_CONTAINER | Resource contains other resources that can be enumerated using the WNetOpenEnum, WNetEnumResource, and WNetCloseEnum APIs. The resource may not currently contain any resources (i.e. the first NPEnumResource call may return WN_NO_MORE_ENTRIES). |
RESOURCEUSAGE_NOLOCALDEVICE | Resource can be connected to without associating a local device (such as D: or LPT1). |
RESOURCEUSAGE_SIBLING | Resource is a sibling of the previous resource returned from the current enumeration (only set if dwScope is RESOURCE_CONTEXT, since resources are always siblings of each other if dwScope is RESOURCE_GLOBALNET). |