RxCreateVNetRoot allocates and initializes a NET_ROOT structure and inserts the name into the net name table on the associated device object.
PV_NET_ROOT RxCreateVNetRoot( _In_ PRX_CONTEXT RxContext, _In_ PNET_ROOT NetRoot, _In_ PUNICODE_STRING CanonicalName, _In_ PUNICODE_STRING LocalNetRootName, _In_ PUNICODE_STRING FilePath, _In_ PRX_CONNECTION_ID RxConnectionId );
- RxContext [in]
A pointer to the RDBSS RX_CONTEXT containing the IRP describing a create operation.
- NetRoot [in]
A pointer to the associated NET_ROOT structure.
- CanonicalName [in]
A pointer to the canonical name to be inserted in the name table.
- LocalNetRootName [in]
A pointer to the local NET_ROOT name without the prefix name.
- FilePath [in]
A pointer to a file pathname. This parameter is not currently used and can be NULL.
- RxConnectionId [in]
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 name table.
RxCreateVNetRoot returns a pointer to a newly created V_NET_ROOT data structure on success or a NULL pointer on failure.
The RxCreateVNetRoot 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 V_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 RxCreateVNetRoot, a lock on the name table associated with the device object member of the RxContext parameter must be acquired in exclusive mode.
RxCreateVNetRoot sets a variety of security context parameters on the V_NET_ROOT structure based on parameters from the RX_CONTEXT. These parameters include the following: LogonId, SessionId, pUserName, pUserDomainName, pPassword, and Flags.
- The NET_ROOT Structure
- The V_NET_ROOT Structure