// midatlax.h
NTSTATUS RxAssociateContextWithMid(
PRX_MID_ATLAS MidAtlas,
PVOID Context,
PUSHORT NewMid
);
View the official Windows Driver Kit DDI referenceNo description available.
RxAssociateContextWithMid associates the supplied opaque context with an available multiplex ID (MID) from a MID_ATLAS.
MidAtlasA pointer to the MID_ATLAS data structure.
ContextA pointer to the context.
NewMidA pointer to the multiplex ID to be associated with the context.
RxAssociateContextWithMid returns STATUS_SUCCESS on success or one of the following error values:
| Return code | Description |
|---|---|
| STATUS_INSUFFICIENT_RESOURCES | This error is returned when it was not possible to allocate sufficient memory for the new MID_MAP data structure. |
| STATUS_UNSUCCESSFUL | This error is returned for several cases including when the number of MIDs already in use is greater than the maximum number of MIDs set when the MID_ATLAS structure was created. |
RDBSS defines a Multiplex ID (MID), a 16-bit value, that can be used by both the network client (mini-redirector) and the server to distinguish between the concurrently active requests on any connection. A MID is a component of a MID_ATLAS data structure allocated by calling RxCreateMidAtlas. A MID_MAP data structure is allocated and used for mapping MIDs to RX_CONTEXT data structures. RxAssociateContextWithMid allocates non-paged pool memory when creating a new MID_MAP data structure.
The pContext parameter can be any opaque context but it is commonly an RX_CONTEXT.
RxMapAndDissociateMidFromContext