PRB: Compiled In-Process Server Used Before IDE ServerLast reviewed: April 10, 1996Article ID: Q149049 |
The information in this article applies to:
SUMMARYA request for an object provided by both a compiled OLE server dynamic-link library (DLL) and an instance of the OLE server running in the Visual Basic for Windows integrated design environment (IDE) is filled by the compiled DLL.
MORE INFORMATIONGenerally, OLE automation clients receive objects from an instance of an OLE server running in the Visual Basic for Windows IDE before they receive objects from a compiled server. Visual Basic for Windows accomplishes this functionality by temporarily adding or modifying registry keys when an IDE server is started and then restoring the original settings when the server is stopped. This was done to make debugging of OLE servers as easy as possible. However, if a server has previously been compiled into an OLE DLL, then objects are provided from that compiled DLL before they are provided by a server running in the IDE. The reason for this behavior is rooted in the search path OLE uses when attempting to create an object. This search path is listed below: - Inprocess server of same bitness - 32-bit local server (for 16-bit clients under a Microsoft Win32 operating system)- Local server of same bitness - Local server of other bitness Servers running in the IDE are always out-of-process. When a request for an object is made, OLE encounters the previously compiled in-process server before it encounters the one running in the IDE, and so it creates the object from that DLL.
WORKAROUNDIt is possible to test the execution of what will become an OLE DLL in the IDE when you have a previously compiled DLL. To accomplish this functionality temporarily unregister the previously compiled DLL using Regsvr32.exe. Then reregister the DLL by using Regsvr32.exe. For example: Do the following to unregister the previously compiled DLL:
regsvr32.exe -u DLLName.DLLDo the following to reregister the DLL:
regsvr32.exe DLLName.DLLIf you make a new DLL while still working, Visual Basic for Windows registers it when the DLL is made with the "Make OLE DLL" command.
Steps to reproduce problem
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |