Microsoft KB Archive/123422

{|
 * width="100%"|

Win32s OLE 16/32 Interoperability

 * }

Q123422

-

The information in this article applies to:


 * Microsoft Win32s version 1.20

-

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.

Additional query words:

Keywords :

Issue type :

Technology : kbWin32sSearch kbWin32s120