Knowledge Base

Win32s OLE 16/32 Interoperability

PSS ID Number: 123422

Article Last Modified on 1/19/2000


The information in this article applies to:


This article was previously published under Q123422

SUMMARY

The OLE support provided in Win32s version 1.2 provides full 16/32 interoperabililty for local servers (EXE servers). Therefore, you can embed a 32-bit object implemented by a local server in a 16-bit container and vice-versa.

There is no built-in support in Win32s for 16/32 interoperability for in-process servers (DLL servers). However, you can use Universal Thunks to load a 16-bit DLL in the context of a 32-bit process. This allows you to embed a 16-bit object implemented by a DLL server in a 32-bit container. However, it is quite complicated to write this code because:

  • Any OLE interface has a hidden "this" pointer which you must handle in your thunking code.
  • OLE uses callbacks. If your 32-bit container calls IDataObject:DAdvise, then your 16-bit server may call back into the 32-bit side with the Advise interface. Your thunking code will have to handle this type of conversation.
NOTE: Embedding a 32-bit object implemented by an in-process server in a 16-bit container is supported under Windows NT 3.5. However, this functionality may not work correctly for your in-process server because IDispatch and any custom interfaces do not work.

Keywords: KB123422
Technology: kbWin32s120 kbWin32sSearch