RxAssociateContextWithMid
TOC
Collapse the table of content
Expand the table of content

RxAssociateContextWithMid function

RxAssociateContextWithMid associates the supplied opaque context with an available multiplex ID (MID) from a MID_ATLAS.

Syntax


NTSTATUS RxAssociateContextWithMid(
   PRX_MID_ATLAS pMidAtlas,
   PVOID         pContext,
   PUSHORT       pNewMid
);

Parameters

pMidAtlas

A pointer to the MID_ATLAS data structure.

pContext

A pointer to the context.

pNewMid

A pointer to the multiplex ID to be associated with the context.

Return value

RxAssociateContextWithMid returns STATUS_SUCCESS on success or one of the following error values:

Return codeDescription
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.

 

Remarks

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.

Requirements

Target platform

Header

Midatlax.h (include Midatlax.h)

IRQL

<= APC_LEVEL

See also

RxCreateMidAtlas
RxDestroyMidAtlas
RxMapMidToContext
RxMapAndDissociateMidFromContext
RxReassociateMid

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft