cyost

A little background...

We have several COM Dlls, compiled in both 64 and 32 bit, each correctly works in a .net console app (32-bit to 32-bit console, etc). 2 of these objects are returned as out parameters from a 3rd.

When we run 32-bit mode in IIS, evenrything works correctly, using the 32-bit version of the COM objects.

We we run in 64-bit mode in IIS, some of the COM objects work and some don't. One in particular is getting an E_NOINTERFACE error why typecasting the object (returned) to the correct interop interface.

If we break the code apart, the call returns a reference, and the typecast calls QI on the COM object.

If we turn on ATL debugging on the com object, we see the QI for interface, and it works successfully.

(see some sample code below)

Anyone have a similar problem, or any ideas where we could look

chad

// This retrieves the COM pointer, where it is in another 64-bit process

WestLib.OWest west = GetWest();

// This works

SessionLib.Session session = (SessionLib.Session)west.Session;

// This throws a COMException (E_NOINTERFACE)

SettingsLib.Settings settings = (Settingslib.Settings)west.Settings;



Re: 64-Bit .NET Framework Development. QI Works, but object is null

Feng Chen - MSFT

Hi cyost,

To troubleshoot this issue, we really need the source code to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.

Thanks for your understanding!






Re: 64-Bit .NET Framework Development. QI Works, but object is null

Feng Chen - MSFT

Hi cyost,


We are changing the issue type to ¡°Comment¡± because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to ¡°Question¡± by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Thank you!