Platform SDK: Network Management

USE_INFO_1

The USE_INFO_1 structure contains information about the connection between a local device and a shared resource. The information includes connection status and connection type.

typedef struct _USE_INFO_1 {
  LPWSTR  ui1_local;
  LPWSTR  ui1_remote;
  LPWSTR  ui1_password;
  DWORD   ui1_status;
  DWORD   ui1_asg_type;
  DWORD   ui1_refcount;
  DWORD   ui1_usecount;
}USE_INFO_1, *PUSE_INFO_1, *LPUSE_INFO_1;

Members

ui1_local
Pointer to a Unicode string that specifies the local device name (for example, drive E or LPT1) being redirected to the shared resource. The constant DEVLEN specifies the maximum number of characters in the string. This member can be NULL. For more information, see the following Remarks section.
ui1_remote
Pointer to a Unicode string that specifies the share name of the remote resource being accessed. The string is in the form:
\\servername\sharename
 
ui1_password
Pointer to a Unicode string that contains the password needed to establish a session between a specific workstation and a server.
ui1_status
Specifies the status of the connection. This element is not used by the NetUseAdd function. The following values are defined.
Value Meaning
USE_OK The connection is valid.
USE_PAUSED Paused by local workstation.
USE_SESSLOST Disconnected.
USE_DISCONN An error occurred.
USE_NETERR A network error occurred.
USE_CONN The connection is being made.
USE_RECONN Reconnecting.

ui1_asg_type
Specifies the type of remote resource being accessed. This member can be one of the following values.
Value Meaning
USE_WILDCARD Matches the type of the server's shared resources. Wildcards can be used only with the NetUseAdd function, and only when the ui1_local member is a null string. For more information, see the following Remarks section.
USE_DISKDEV Disk device.
USE_SPOOLDEV Spooled printer.
USE_IPC Interprocess communication (IPC).

ui1_refcount
Specifies how many files, directories, and other processes are open on the remote resource. This element is not used by the NetUseAdd function.
ui1_usecount
Specifies how many explicit connections (redirection with a local device name) or implicit UNC connections (redirection without a local device name) are established with the resource.

Remarks

Specifying a NULL ui1_local member requests authentication with the server without redirecting a drive letter or a device. Future redirections involving the server while the same connection is in effect use the password specified by the ui1_password member in the initial call to the NetUseAdd function.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Lmuse.h.

See Also

Network Management Overview, Network Management Structures, Use Functions, NetUseAdd, NetUseEnum, NetUseGetInfo