The NETRESOURCE structure is returned during enumeration of resources on the network and during enumeration of currently connected resources.
typedef struct _NETRESOURCE { // nr
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPTSTR lpLocalName;
LPTSTR lpRemoteName;
LPTSTR lpComment;
LPTSTR lpProvider;
} NETRESOURCE;
Value | Meaning |
---|---|
RESOURCE_CONNECTED | Currently connected resources (the dwUsage member is undefined). |
RESOURCE_GLOBALNET | Resources on the network. |
RESOURCE_REMEMBERED | Remembered (persistent) connections (dwUsage is undefined). |
Value | Meaning |
---|---|
RESOURCETYPE_ANY | All resources |
RESOURCETYPE_DISK | Disk resources |
RESOURCETYPE_PRINT | Print resources |
Value | Meaning |
---|---|
RESOURCEDISPLAYTYPE_DOMAIN | |
The object should be displayed as a domain. | |
RESOURCEDISPLAYTYPE_GENERIC | |
The method used to display the object does not matter. | |
RESOURCEDISPLAYTYPE_SERVER | |
The object should be displayed as a server. | |
RESOURCEDISPLAYTYPE_SHARE | |
The object should be displayed as a sharepoint. |
Value | Meaning |
---|---|
RESOURCEUSAGE_CONNECTABLE | This is a connectable resource; the name pointed to by the lpRemoteName member can be passed to the WNetAddConnection function to make a network connection. |
RESOURCEUSAGE_CONTAINER | This is a container resource; the name pointed to by the lpRemoteName member can be passed to the WNetOpenEnum function to enumerate the resources in the container. |
If the entry is a current or persistent connection, lpRemoteName points to the network name associated with the name pointed to by the lpLocalName member.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Use version 2.0 or later.
Header: Declared in winnetwk.h.
Windows Networking (WNet) Overview, Windows Networking Structures, WNetAddConnection, WNetCloseEnum, WNetEnumResource, WNetOpenEnum