Compartir a través de


2.2.20 Context

This is the marshaled representation of a context (1). It contains an array of marshaled context properties, each of which is represented by a PROPMARSHALHEADER.

There are three types of context (1) structures:

  • A client context. This type of context (1) is sent in an activation request in the pIFDClientCtx field of the ActivationContextInfoData structure (section 2.2.22.2.5). The context (1) structure MUST be marshaled into an OBJREF_CUSTOM structure (section 2.2.18.6) whose clsid field is set to CLSID_ContextMarshaler (section 1.9). The iid field of the OBJREF portion of the OBJREF_CUSTOM structure MUST be set to IID_IContext (section 1.9). An implementation MAY use this value as the IID of an interface with the local IDL attribute (section 2.2.27).<12>

  • A prototype context. An application or a higher-layer protocol can instruct a DCOM client to send this type of context (1) in an activation request. The prototype context is sent in the pIFDPrototypeCtx field of the ActivationContextInfoData structure (section 2.2.22.2.5). The context (1) structure MUST be marshaled into an OBJREF_CUSTOM structure (section 2.2.18.6) whose clsid field is set to CLSID_ContextMarshaler (section 1.9). The iid field of the OBJREF portion of the OBJREF_CUSTOM structure MUST be set to IID_IContext (see section 1.9). An implementation MAY use this value as the IID of an interface with the local IDL attribute (section 2.2.27).<13>

  • An envoy context. An application or a higher-layer protocol can instruct a DCOM server to send this type of context (1) when marshaling an object. The envoy context is sent in the Data field of the ElmArray field (section 2.2.18.8) of an OBJREF_EXTENDED structure (section 2.2.18.7).


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

MajorVersion

MinVersion

ContextId (16 bytes)

...

...

Flags

Reserved

dwNumExtents

cbExtents

MshlFlags

Count

Frozen

PropMarshalHeader (variable)

...

MajorVersion (2 bytes):  The major version of this context marshaled format. This MUST be set to 0x0001.

MinVersion (2 bytes): The minor version of this context (1) marshaled format. This MUST be set to 0x0001.

ContextId (16 bytes):  A GUID identifying the marshaled context (1).

Flags (4 bytes): This MUST be set to the following value.

Value

Meaning

CTXMSHLFLAGS_BYVAL

0x00000002

The context is marshaled by value (this is the only representation that is valid on the wire).

Reserved (4 bytes):  This MUST be set to 0x00000000 and MUST be ignored on receipt.

dwNumExtents (4 bytes):  This MUST be set to 0x00000000.

cbExtents (4 bytes):  This MUST be set to 0x00000000.

MshlFlags (4 bytes): This MUST contain an implementation-specific value that MUST be ignored on receipt.<14>

Count (4 bytes):  The unsigned number of elements in the PropMarshalHeader array.

Frozen (4 bytes):  A Boolean that MUST be set to TRUE (0x00000001) and that MUST be ignored on receipt.

PropMarshalHeader (variable):  This MUST be an array of PROPMARSHALHEADER entries.