PRB: COM Calls from a Thunked DLL Fail (263618)



The information in this article applies to:

  • Microsoft COM, when used with:
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows NT

This article was previously published under Q263618

SYMPTOMS

A Component Object Model (COM) call that is made from a thunked dynamic link library (DLL) may fail. If a 16-bit process thunks a 32-bit DLL that makes COM calls, the COM calls may fail.

CAUSE

You cannot make COM calls from a mixed-model process.

RESOLUTION

To resolve this problem, do not use thunking when you make COM calls. Instead, make COM calls directly from a 16-bit process to interoperate with a 32-bit COM server or vice versa.

MORE INFORMATION

COM supports the following interoperability for standard (OLE 2 defined) interfaces:

  • 16 to 16 (in-process server)
  • 16 to 16 (local server)
  • 16 to 32 (local server)
  • 32 to 32 (in-process server)
  • 32 to 32 (local server)
  • 32 to 16 (local server)
COM does not support 32-bit to 16-bit (in-process server) interoperability that uses the standard interfaces.

COM supports the following interoperability for Custom interfaces:
  • 16 to 16 (in-process server)
  • 32 to 32 (in-process server)
  • 32 to 32 (local server using MIDL-generated stubs)
COM does not support the following interoperability for Custom interfaces:
  • 16 to 16 (local server)
  • 16 to 32 (all combinations)
  • 32 to 16 (all combinations)

REFERENCES

For more information, see the Platform Software Development Kit (SDK) documentation on 16-bit to 32-bit Interoperability at the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kbClient KbClientServer kbDLL kbInprocSvr kbprb kbServer KB263618