Microsoft KB Archive/263618

= PRB: COM Calls from a Thunked DLL Fail =

Article ID: 263618

Article Last Modified on 12/1/2003

-

APPLIES TO

 Microsoft COM+ 2.0 Standard Edition, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows 95

 Microsoft Windows 98 Standard Edition

 Microsoft Windows NT 4.0</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q263618

<div class="symptoms_section">

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.

<div class="cause_section">

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

<div class="resolution_section">

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.

<div class="moreinformation_section">

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)

<div class="references_section">