IFSMgr_UseDel( pioreq pir, int proId, netuse_info *pinfo )
This service is called by an FSD to perform a network delete use operation to delete a connection to a network resource.
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.
ir_data
Supplies the ASCIIZ string the resource to be disconnected is currently connected to viz. a device name or driveletter or UNC name.
ir_flags
Supplies the force level to use for the disconnection. There are 4 possible force levels: from 0 through 3. The force level has different semantics based on the type of connection. These are described below. Note that static connections cannot be blasted by any of these force levels. They are disconnected only when the system shuts down.
UNC Disconnection Force Values: | |
Value | Meaning |
FORCE LEVEL 0 | Fails if there are any open files. If there are multiple UNC connections to the same resource, this disconnects only one of them. |
FORCE LEVEL 1 | Fails if there are any open files. It blasts all UNC connections to the resource if there are no open files. |
FORCE LEVEL 2, 3 | Forces open files closed and then destroys all UNC connections to the resource. Any references to these open files that have been forced closed will be failed by the IFS manager. |
Drive-based Disconnection Force Values: | |
Value | Meaning |
FORCE LEVEL 0, 1 | Fails if there are any open files on the resource or if it is the current drive. |
FORCE LEVEL 2 | Force closes open files and then disconnects the drive. The disconnection will be failed on level 2 if the drive to be disconnected is the current drive. |
FORCE LEVEL 3 | Force closes open files and disconnects the drive even if it is the current drive. |
Device-based Disconnection Force Values: | |
Value | Meaning |
FORCE LEVEL 0, 1 | Fails if there any open files. If there are no open files, the device will be disconnected. |
FORCE LEVEL 2, 3 | Force closes any open files and then disconnects the device. |
proId
Supplies the provider id of the provider requesting the disconnect.
pinfo
Supplies an optional pointer to a netuse_info structure, this should only be passed in if the provider has no IOREQ available i.e. NULL is passed in on the pir parameter above. 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 the ASCIIZ string the resource to be disconnected is currently connected to viz. a device name or driveletter or UNC name. |
nu_level | Disconect force level. |
nu_flags | Supplies flags for the request. |
FSD_NETAPI_USEOEM | Is set if you are passing in OEM strings, otherwise strings are assumed to be ANSI. |
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.
ir_error | Returns 0 if success, errorcode if failure. Returns 0 if no error, errorcode otherwise. |