OBJREF

OBJREF

OBJREF is the name of the structure of marshalled interfaces in COM and DCOM. Because COM interfaces can only be called directly from the context (like a thread, process or machine) where they originated, when they are needed in another context they are marshalled in this structure, which is then passed to the destination context where it is unmarshalled to a proxy that takes care of the necessary communication, for example passing messages or network packets or marshalling other interfaces passed in calls.[1][2]

Format

The layout of the structure is as follows:[3][4]

Offset Size Description
0 4 Signature: ‘MEOW’
4 4 Flag indicating the kind of structure
8 16 Interface identifier
Flag = 1: standard
24 4 Flags, mostly reserved for the system, but can be used to turn off pinging objects.[5]
28 4 Reference count
32 8 OXID – object exporter identifier[6]
40 8 OID – object identifier[6]
48 16 IPID – interface pointer identifier[7]
64 variable DUALSTRINGARRAY
Flag = 2: handler (an extension of standard)[8]
64 16 Class identifier of a class that will be used as a handler for the interface, i.e. sit between the client and the proxy.
80 variable DUALSTRINGARRAY
Flag = 4: custom marshalling[9]
24 16 Class identifier of the custom proxy
40 4 0 (reserved value)
44 4 Size of the data below
48 variable Custom marshalling data
Flag = 8: extended (also an extension of standard)[10]
64 4 Signature ‘VYSN’
68 variable DUALSTRINGARRAY
  4 1 (historically the number of data elements below, but there always is only a single element)
  4 Signature ‘VYSN’
Data element used to identify and marshal an envoy context:[11][12][13]
  16 Context identifier[14]
  4 Size of the data below, excluding padding
  4 Size of the data below, including padding
  8n A marshalled envoy context, padded to a multiple of eight bytes

The layout of DUALSTRINGARRAY is:[15][16]

Offset Size Description
0 2 Total number of entries in the arrays below, including nulls
2 2 Number of entries in the array that represent string bindings
4 2n String and security bindings

The string bindings are null-terminated records specifying connection information, like IP addresses, and the security bindings are null-terminated records specifying authentication information. Both arrays are null-terminated too.

References

  1. ^ Tim Ewald (2001-03-06). "The Mechanics of COM+". Informit. Pearson Education & Addison-Wesley Professional. http://www.informit.com/articles/article.aspx?p=167771&rll=1. Retrieved 2008-09-07. 
  2. ^ Mike Hearn (2005-01-22). "More DCOM notes". Wine Developer's List. Codeweavers. http://www.winehq.org/pipermail/wine-devel/2005-January/033082.html. Retrieved 2008-09-07. 
  3. ^ "dcom.idl". Wine. CodeWeavers. 2003. http://source.winehq.org/source//dlls/ole32/dcom.idl#L133. Retrieved 2008-09-06. 
  4. ^ Dharma Shukla (1998). "ShowMeMyOBJREF". http://members.tripod.com/IUnknwn/showme.htm. Retrieved 2008-09-07.  (This is example code to inspect the contents of an OBJREF.)
  5. ^ Eddon, Guy; Eddon, Henry (March 1998). "Understanding the DCOM Wire Protocol by Analyzing Network Data Packets". Microsoft Systems Journal. Microsoft. http://www.microsoft.com/msj/0398/dcom.aspx. Retrieved 2008-09-07. 
  6. ^ a b "Windows Protocols Master Glossary: O". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc232137.aspx. Retrieved 2008-09-06. "object exporter identifier (OXID): A 64-bit number that uniquely identifies an object exporter within an object server. … object identifier (OID): (1) In the context of an object server, a 64-bit number that uniquely identifies an object." 
  7. ^ "Windows Protocols Master Glossary: I". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc232132.aspx. Retrieved 2008-09-06. "interface pointer identifier (IPID): A 128-bit number that uniquely identifies an interface on an object within an object exporter." 
  8. ^ "OBJREF_HANDLER". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc226833.aspx. Retrieved 2008-09-06. 
  9. ^ "OBJREF_CUSTOM". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc226834.aspx. Retrieved 2008-09-07. 
  10. ^ "OBJREF_EXTENDED". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc226835.aspx. Retrieved 2008-09-06. 
  11. ^ "Context Properties". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc225397.aspx. Retrieved 2008-09-07. 
  12. ^ "Context Properties and Marshaling". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc225402.aspx. Retrieved 2008-09-07. 
  13. ^ "Windows Protocols Master Glossary: E". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc232153.aspx. Retrieved 2008-09-07. "envoy context: A context that is marshaled and returned to a client as a result of obtaining an object reference." 
  14. ^ "Windows Protocols Master Glossary: C". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc232151.aspx. Retrieved 2008-09-07. "context: A collection of context properties that describe an execution environment. sqq." 
  15. ^ "DUALSTRINGARRAY". MSDN. Microsoft. http://msdn.microsoft.com/en-us/library/cc226837.aspx. Retrieved 2008-09-06. 
  16. ^ Eddon, Guy; Eddon, Henry (1999). "Marshaled Interface Pointers". In Stroo, Eric; Turner, Alice; Young, Marc and Chang, Ina. Inside COM+ Base Services. Redmond: Microsoft Press. ISBN 0-7356-0728-1. 

Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Session Beans — In the Java Platform, Enterprise Edition specifications, a Session Bean is a type of Enterprise Beans. In the J2EE architecture, the other two types are Entity Beans and Message driven beans. However, in Java EE 5 entity beans have been replaced… …   Wikipedia

  • Nombre magique (programmation) — Pour les articles homonymes, voir Nombre magique (homonymie). En programmation informatique, le terme magic number (en français « nombre magique ») peut référer à : une constante numérique ou un ensemble de caractères utilisé pour… …   Wikipédia en Français

  • Comparison of layout engines (Document Object Model) — The following tables compare DOM compatibility and support for a number of layout engines. Please see the individual products articles for further information. This article is not all inclusive or necessarily up to date. Unless otherwise… …   Wikipedia

  • Neuron (software) — NEURON Developer(s) Michael Hines, John W. Moore, and Ted Carnevale Stable release 7.1 / October 27, 2009; 23 months ago (2009 10 27) Development status Active …   Wikipedia

  • .NET Remoting — ist ein umfassendes, erweiterbares Framework für die nahtlose Kommunikation zwischen Objekten, die sich in verschiedenen Applikationsdomänen oder Prozessen bzw. auf unterschiedlichen Computern befinden. Es ermöglicht sozusagen die Kommunikation… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”