RxCreateNetRoot function (fcb.h)

RxCreateNetRoot allocates and initializes a NET_ROOT structure and inserts the name into the net name table on the associated device object.

Syntax

PNET_ROOT RxCreateNetRoot(
  [in]           IN PSRV_CALL         SrvCall,
  [in]           IN PUNICODE_STRING   Name,
  [in]           IN ULONG             NetRootFlags,
  [in, optional] IN PRX_CONNECTION_ID RxConnectionId
);

Parameters

[in] SrvCall

A pointer to the associated SRV_CALL structure.

[in] Name

A pointer to the name to be inserted in the name table.

[in] NetRootFlags

The value to set the Flags member of the NET_ROOT which is used to denote the state of the NET_ROOT structure.

[in, optional] RxConnectionId

A pointer to the connection ID to be associated with the name to be inserted in the prefix name table. This parameter can be NULL in which case no connection ID will be associated with the name inserted in the prefix name table.

Return value

RxCreateNetRoot returns a pointer to a newly created NET_ROOT data structure on success or a NULL pointer on failure.

Remarks

The RxCreateNetRoot routine is not normally called by network mini-redirector drivers directly. RDBSS calls this routine internally when an I/O request packet is received for IRP_MJ_CREATE and a NET_ROOT needs to be created. This IRP is normally received by RDBSS in response to a user-mode application requesting a file create operation on a network share. It is also possible for another kernel driver to issue such an IRP.

Before calling RxCreateNetRoot, a lock on the name table associated with the device object member of the SrvCall parameter must be acquired in exclusive mode.

The NET_ROOT flags are split into two groups, those visible to network mini redirectors and those invisible to network mini redirectors. The visible ones are the lower 16-bits of the Flags member of the NET_ROOT. This routine does not check or test which flags are being set.

On success, the reference count for the SRV_CALL structure is incremented.

Requirements

Requirement Value
Target Platform Desktop
Header fcb.h (include Rxcontx.h, Mrxfcb.h, Prefix.h, Struchdr.h, Fcb.h)
IRQL <= APC_LEVEL

See also

RxCreateNetFcb

RxCreateNetFobx

RxCreateSrvCall

RxCreateSrvOpen

RxCreateVNetRoot

RxDereference

RxFinalizeConnection

RxFinalizeNetFcb

RxFinalizeNetFobx

RxFinalizeNetRoot

RxFinalizeSrvCall

RxFinalizeSrvOpen

RxFinalizeVNetRoot

RxFinishFcbInitialization

RxForceFinalizeAllVNetRoots

RxReference

RxSetSrvCallDomainName

RxpDereferenceNetFcb

RxpReferenceNetFcb

The NET_ROOT Structure

The SRV_CALL Structure