BUG: 16-bit Custom Handler Not Loaded If 32-bit Handler FoundLast reviewed: November 14, 1995Article ID: Q139216 |
The information in this article applies to:
- Microsoft OLE libraries included with:
- Microsoft Windows NT version 3.51 - Microsoft Windows 95 version 4.0
SYMPTOMSAn OLE object that provides a custom handler and needs to be embedded in 16- and 32-bit containers must provide a 16-bit and a 32-bit implementation of the handler. When such an object is created in a 16-bit container, the OleCreate function or its variant will return CO_E_ERRORINDLL.
CAUSEAn OLE object with 16-bit and 32-bit implementations of a custom handler will register the handlers as follows:
HKEY_CLASSES_ROOT\CLSID\{...}\InProcHandler32 = HNDLR32.DLL HKEY_CLASSES_ROOT\CLSID\{...}\InProcHandler = HNDLR16.DLLHndlr32.dll is the 32-bit implementation of the handler and Hndlr16.dll is the 16-bit implementation of the handler. OleCreate or its variants are supposed to load the 16-bit handler in a 16-bit container and the 32-bit handler in a 32-bit container. Because of a problem in OLE, the 16-bit handler is not loaded if a 32-bit handler is found in the registry. Consequently a 16-bit container will not be able to create the object. However a 32-bit container will be able to create the object. The 16-bit container will be able to create the object if the InProcHandler32 registration is removed, but then a 32-bit container will not be able to create the object.
RESOLUTIONRegister the handler as an in-process server instead of a handler as follows:
HKEY_CLASSES_ROOT\CLSID\{...}\InProcServer32 = HNDLR32.DLL HKEY_CLASSES_ROOT\CLSID\{...}\InProcServer = HNDLR16.DLLThe handler will work correctly even though it is registered as an in-process server.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional reference words: 2.00 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |