RxFinalizeSrvOpen finalizes the given SRV_OPEN structure. The caller must have an exclusive lock on the FCB associated with the SRV_OPEN and either a shared or exclusive lock on the table lock of the NET_ROOT associated with the FCB.
BOOLEAN RxFinalizeSrvOpen( _Out_ PSRV_OPEN ThisSrvOpen, _In_ BOOLEAN RecursiveFinalize, _In_ BOOLEAN ForceFinalize );
- ThisSrvOpen [out]
A pointer to the SRV_OPEN structure to finalize.
- RecursiveFinalize [in]
The value indicating whether the finalization should be done recursively.
- ForceFinalize [in]
The value indicating whether the finalization should be forced, regardless of the reference count.
If ForceFinalize is FALSE, then the NodeReferenceCount member of the SRV_OPEN structure pointed to by ThisSrvOpen must be 0 for the SRV_OPEN to be finalized.
RxFinalizeSrvOpen returns TRUE on success or FALSE if the finalization did not occur:
The RxFinalizeSrvOpen routine is not normally called by network mini-redirector drivers directly. RDBSS calls this routine internally when the reference count on the SRV_OPEN is decremented to 1. RDBSS also calls RxFinalizeSrvOpen when the RxFinalizeNetFcb routine is called with the RecursiveFinalize set to TRUE. RDBSS calls RxFinalizeNetFcb when an I/O request packet is received for IRP_MJ_CLOSE. This IRP is normally received by RDBSS in response to a user-mode application requesting a file close operation. It is also possible for another kernel driver to issue such an IRP.
Before calling RxFinalizeSrvOpen, the caller must have acquired an exclusive lock on the FCB associated with the SRV_OPEN and acquired either a shared or exclusive lock on the table lock of the NET_ROOT associated with the FCB.
If the RecursiveFinalize parameter is TRUE, then RxFinalizeSrvOpen will finalize any FOBX structures associated with this SRV_OPEN by calling RxFinalizeNetFobx with the RecursiveFinalize parameter set to TRUE and the ForceFinalize parameter.
If the FcbState member of the associated FCB does not have the FCB_STATE_ORPHANED flag set, then RxFinalizeSrvCall will call the MRxForceClosed routine provided by the network mini-redirector to finalize the SRV_CALL. If the SRV_CALL structure was not originally allocated as part of creating the FCB, then the memory for the SRV_CALL structure will also be released.
- The SRV_OPEN Structure
Build date: 11/16/2013