2.2.5.23 USE_INFO_1
The USE_INFO_1 structure specifies details about the connection between a machine on which the workstation service is running and a shared resource, including connection status and connection type.
-
typedef struct _USE_INFO_1 { [string] wchar_t* ui1_local; [string] wchar_t* ui1_remote; [string] wchar_t* ui1_password; unsigned long ui1_status; unsigned long ui1_asg_type; unsigned long ui1_refcount; unsigned long ui1_usecount; } USE_INFO_1, *PUSE_INFO_1, *LPUSE_INFO_1;
ui1_local: A pointer to a string that contains the device name (for example, drive E or LPT1) being redirected to the shared resource.
ui1_remote: A pointer to a string that contains the share name of the remote resource being accessed. The string MUST be in the following form: "\\servername\sharename".
ui1_password: A pointer to a string that contains the password needed to establish a session between a machine on which the workstation service is running and a server.
ui1_status: The current status of the connection, which MUST contain one of the following values:
-
Value/code
Meaning
USE_OK
0x00000000
The connection is valid.
USE_PAUSED
0x00000001
Paused by local workstation.
USE_SESSLOST
0x00000002
Disconnected.
USE_NETERR
0x00000003
A network error occurred.
USE_CONN
0x00000004
The connection is being made.
USE_RECONN
0x00000005
Reconnecting.
ui1_asg_type: The type of remote resource being accessed, which MUST contain one of the following values:
-
Value/code
Meaning
USE_WILDCARD
0xFFFFFFFF
Matches the type of the server’s shared resources. Wildcards can be used only with the NetrUseAdd function (section 3.2.4.7), and only when the ui1_local member is NULL.
USE_DISKDEV
0x00000000
Disk device.
USE_SPOOLDEV
0x00000001
Spooled printer.
USE_CHARDEV
0x00000002
Serial device.
USE_IPC
0x00000003
Inter process communication (IPC).
ui1_refcount: The number of files, directories, and other processes that can be opened on the remote resource.
ui1_usecount: The number of explicit connections (with a device name) or implicit UNC connections (without the device name) that are established with the resource.