IFSMgr_UseAdd
IFSMgr_UseAdd(
pioreq pir,
int proId,
netuse_info *pinfo
)
This service is called by an FSD to perform a network use operation to connect to a network resource. This service is normally not necessary to use. Most connections are done by the IFS manager directly. This is needed only for certain private APIs that the IFS manager does not understand.
- pir
- Supplies pointer to IOREQ structure. If a NULL is passed in for the IOREQ pointer, the IFS manager allocates an IOREQ structure for the duration of this call. In this case, the caller also needs to pass in the pinfo parameter so that the IOREQ structure can be appropriately initialized. The IOREQ structure is freed before return from the service.
IOREQ Structure: |
|
Value |
Meaning |
ir_data |
Supplies flat pointer to use_info_2 structure described below. |
Use_Info_2 Structure: |
|
Value |
Meaning
The fields that need to be initialized are described below. All other fields should be set to zero.
|
ui2_local |
Supplies the ASCIIZ string the resource is to be connected to viz. a device name or driveletter. |
ui2_remote |
Supplies the ASCIIZ resource name that is to be connected. |
ui2_password |
Supplies the ASCIIZ string for the password of the resource, if any. This pointer should be NULL if there is no password for this resource. |
ui2_asg_type |
Supplies resource type for connection. |
Connection Resource Type Values:
One of the following resource types will be specified.
|
|
Value |
Meaning |
USE_WILDCARD |
Wild card resource type. |
USE_DISKDEV |
Disk resource. |
USE_SPOOLDEV |
Spooled printer resource. |
USE_CHARDEV |
Character device resource. |
USE_IPC |
Interprocess communication resource. |
- ui2_res_type
- Supplies resource name type.
Resource Name Type Values: |
|
Value |
Meaning |
USE_RES_UNC |
Resource name is UNC. Currently, this is the only supported flag and ui2_res_type must always be set to this. |
- ir_flags
- Supplies the connection status. This field has only 2 values: 1 if the connection should be set up disconnected, 0 if it should be set up connected.
- ir_conflags
- Supplies the source of the connection. This must be set to a non-zero value because the connection is not via a normal API level call.
- proId
- Supplies the provider ID of the provider requesting the connection.
- pinfo
- Supplies an optional pointer to a netuse_info structure. This should only be passed in if the provider has no IOREQ available, that is, NULL is passed in the pir field. The fields that need to be initialized are described below. All other fields should be set to zero.
Netuse_Info Structure: |
|
Value |
Meaning |
nu_data |
Supplies a pointer to a use_info_2 struct that is initialized as described above. |
nu_flags |
Supplies flags for the request. |
FSD_NETAPI_USEOEM |
This flag is set if you are passing in OEM strings, otherwise strings are assumed to be ANSI. |
FSD_NETAPI_STATIC |
This flag is set for a connection that will only be removed at shutdown time. |
FSD_NETAPI_USELFN |
This flag specifies that the remote name passed in should be treated as a long name. Otherwise, it is treated as a short name. |
nu_rsvd |
Must be set to 0xff always. |
- Returns 0 if no error, errorcode otherwise.
IOREQ Structure: |
|
ir_error |
Returns 0 if no error, errorcode otherwise. |