IFSMgr_SetupConnection

IFSMgr_SetupConnection(
 pioreq pir,
 unsigned int Options,
 unsigned int ResType
 )
 

This service can be called by an FSD to obtain a connection to a resource dynamically. This cannot be used to connect to a network drive directly since a driveletter cannot be specified. It is provided for special network FSD requirements. The IFS manager allocates an IFS internal request structure, which contains the Ioreq as its first element. When the IFS manager passes the address of the Ioreq to an FSD, it is also passing the address of the IFS request structure. On certain functions, such as Server Enumeration functions, the network FSD calls the IFSMgr_SetupConnection service to perform a connection with the Ioreq address it was originally passed. The IFS manager establishes the connection by calling the FSD on the FS_ConnectResource API and fills in the fields in the IFS request structure that the Ioreq is a part of. The network FSD never needs to look at any of the fields in the IFS request structure. It can now use this initialized Ioreq to perform other operations. When it is done, it can free the connection by calling the IFSMgr_DerefConnection service described below.

ir_ppath
Supplies the parsed canonicalized unicode pathname the connection is to be performed to.
ir_password
Supplies password string (if any). This string is not in unicode; it is in the same context it was originally passed in by the user.
Connection Option Values:

One of the following options will be specified.

 
Value Meaning
RESOPT_UNCREQUEST UNC style path based anonymous connection request.
RESOPT_DEVATTACH Explicit device redirection.
RESOPT_UNCCONNECT Explicit UNC style connection.
RESOPT_DISCONNECTED Connection is to be setup disconnected, without touching the net.
RESOPT_NO_CREATE Do not create a resource for this connection, just verify the connection exists.
RESOPT_STATIC This connection is established at startup and disconnected only at shutdown, no user APIs can disconnect it.
ResType Supplies resource type for connection.

Connection Resource Type Values:

One of the following resource types will be specified.

 
Value Meaning
RESTYPE_WILD Wild card resource type.
RESTYPE_DISK Disk resource.
RESTYPE_SPOOL Spooled printer resource.
RESTYPE_CHARDEV Character device resource.
RESTYPE_IPC Interprocess communication resource.

IOREQ Structure:  
Value Meaning
ir_error Returns 0 if successful, errorcode if failure.
ir_rh Returns the resource handle for the connection if success.
ir_ppath Returns a pointer to the tail of the original pathname after the server and share name.
ir_options Returns special server security information.