Microsoft KB Archive/145700

= How To How the Server Use Is Determined by OLE =

Article ID: 145700

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 5.0 Control Creation Edition
 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q145700



SUMMARY
When an OLE Automation client requests an object that can be provided by more than one server, OLE uses a predefined set of rules to determine which server is used to supply that object. This article lists the order used by OLE when providing objects.



MORE INFORMATION
Each object that can be provided to an OLE Automation client can be identified by an unique 64-bit number called a CLSID. The system registry contains a key called CLSID (immediately off of HKEY_CLASSES_ROOT), which has as subkeys every CLSID registered on the system. The subkeys of each CLSID hold information for each object, including the path and filename of the server(s) that can be used to provide that object, according to this table:   Key               Server -  InprocServer      16-bit DLL (in-process) server InprocServer32   32-bit DLL (in-process) server OutprocServer    16-bit EXE (out-of-process) server OutprocServer32  32-bit EXE (out-of-process) server It is possible (and completely allowed by OLE) to have more than one of the above keys beneath a given CLSID. If this situation occurs, OLE uses a predefined order to determine which server is used to provide an object. This decision is based both on the bitness of the potential OLE Automation client and the bitness of the operating system. OLE uses this order:


 * 1) In-process (DLL) server of same bitness as the client
 * 2) 32-bit local server (only for 16-bit clients on a 32-bit OS)
 * 3) Out of process server of same bitness as client
 * 4) Out of process server of other bitness as client

Additional query words: kbVBp400 kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport kbOLE

Keywords: kbhowto KB145700

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.