//ResourceEnumerationScope枚举:Specifies a DWORD value that contains the scope of the enumeration.
public enum ResourceEnumerationScope
{
RESOURCE_CONNECTED=0x00000001, /*Enumerate currently connected resources. The dwUsage member cannot be specified. */
RESOURCE_GLOBALNET=0x00000002, /*Enumerate all resources on the network. The dwUsage member is specified. */
RESOURCE_REMEMBERED=0x00000003 /*Enumerate remembered (persistent) connections. The dwUsage member cannot be specified. */
}
//ResourceType枚举:Specifies a DWORD value that contains a set of bit flags identifying the type of resource.
public enum ResourceType
{
RESOURCETYPE_ANY=0x00000000, /*All resources*/
RESOURCETYPE_DISK=0x00000001, /*Disk resources*/
RESOURCETYPE_PRINT=0x00000002 /*Print resources*/
}
//ResourceDisplayType枚举:Specifies a DWORD value that indicates how the network object should be displayed in a network browsing user interface.
public enum ResourceDisplayType
{
RESOURCEDISPLAYTYPE_DOMAIN=0x00000001, /*The object should be displayed as a domain. */
RESOURCEDISPLAYTYPE_SERVER=0x00000002, /*The object should be displayed as a server. */
RESOURCEDISPLAYTYPE_SHARE=0x00000003, /*The object should be displayed as a share. */
RESOURCEDISPLAYTYPE_GENERIC=0x00000000 /*The method used to display the object does not matter. */
}
//ResourceUsage枚举:Specifies a DWORD value that contains a set of bit flags describing how the resource can be used. Note that this member can be specified only if the dwScope member is equal to RESOURCE_GLOBALNET.
public enum ResourceUsage
{
RESOURCEUSAGE_CONNECTABLE=0x00000001, /*The resource 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=0x00000002 /*The resource 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. */
}
//ConnectionOption枚举:Specifies a DWORD value that describes connection options.
public enum ConnectionOption
{
CONNECT_INTERACTIVE=0x00000008, /*If this flag is set, the operating system may interact with the user for authentication purposes. */
CONNECT_PROMPT=0x00000010, /*This flag instructs the system not to use any default settings for user names or passwords without offering the user the opportunity to supply an alternative. This flag is ignored unless CONNECT_INTERACTIVE is also set. */
CONNECT_REDIRECT=0x00000080, /*This flag forces the redirection of a local device when making the connection.
If the lpLocalName member of NETRESOURCE specifies a local device to redirect, this flag has no effect, because the operating system still attempts to redirect the specified device. When the operating system automatically chooses a local device, the lpAccessName parameter must point to a return buffer and the dwType member must not be equal to RESOURCETYPE_ANY.
If this flag is not set, a local device is automatically chosen for redirection only if the network requires a local device to be redirected.
Windows XP: When the system automatically assigns network drive letters, letters are assigned beginning with Z:, then Y:, and ending with C:. This reduces collision between per-logon drive letters (such as network drive letters) and global drive letters (such as disk drives). Note that previous releases assigned drive letters beginning with C: and ending with Z:. */
CONNECT_UPDATE_PROFILE=0x00000001, /*The network resource connection should be remembered.
If this bit flag is set, the operating system automatically attempts to restore the connection when the user logs on.
The operating system remembers only successful connections that redirect local devices. It does not remember connections that are unsuccessful or deviceless connections. (A deviceless connection occurs when the lpLocalName member is NULL or points to an empty string.)
If this bit flag is clear, the operating system does not automatically restore the connection at logon.*/
CONNECT_COMMANDLINE=0x00000800, /*Windows XP: If this flag is set, the operating system prompts the user for authentication using the command line instead of a graphical user interface (GUI). This flag is ignored unless CONNECT_INTERACTIVE is also set. */
CONNECT_CMD_SAVECRED=0x00001000 /*Windows XP: If this flag is set, and the operating system prompts for a credential, the credential should be saved by the credential manager. If the credential manager is disabled for the caller's logon session, or if the network provider does not support saving credentials, this flag is ignored. This flag is also ignored unless you set the CONNECT_COMMANDLINE flag. */
}
#endregion