PR# 15365 0x80004002 ("No such interface supported" or E_NOINTERFACE)

Problem Report Summary
Submitter: hcater
Category: EiffelCOM
Priority: High
Date: 2009/02/04
Class: Bug
Severity: Critical
Number: 15365
Release: EiffelStudio 6 (6.4.7.6747 GPL Edition - windows)
Confidential: No
Status: Analyzed
Responsible:
Environment: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081107 Firefox/2.0.0.18 Flock/1.2.7
Synopsis: 0x80004002 ("No such interface supported" or E_NOINTERFACE)

Description
I've narrowed this down to what is likely an EiffelCOM implementation error.  I've duplicated this code using VC++ and it works without error so I dug a little deeper and found the following similar report for what is happening to me under EiffelStudio 6.4

http://forums.asp.net/t/692053.aspx

SYMPTOMS
When you call the CoGetClassObject function for the IClassFactory2 interface on components that are hosted in a COM+ application, the function fails with error 0x80004002 ("No such interface supported" or E_NOINTERFACE).

CAUSE
This error occurs because the class factory wrapper for configured components only supports the IClassFactory interface, not the IClassFactory2 interface.
To Reproduce
Extract the project from 'error.zip' and compile.  You may need to generate the dx8 library by running the COM Wizard on the included dx8vb.dll file.

The project should fail on the following line:
d3dxs ?= d3dx8.create_sprite (d3d_device)

The error message is the following:
0x80004002  No such interface supported
 
Problem Report Interactions
From:hcater    Date:2009/03/04    Download   
Thanks Manu for your responses. I was unfortunately off line for most of the last two days as my baby girl was quite ill.

What you've written does make sense and I will look into my options a bit further as you are correct DX8 was the last DirectX type library.  I will think about wrapping the C++ API directly but since this is not one of my strengths it may have to wait for a while.

Either way, thanks for looking into this.

Hubert

From:manus_eiffel    Date:2009/03/03    Download   
I hope what I said make sense. Looking further in the newest version of DirectX, I found out that Microsoft stops providing a type library making it impossible to use it as a COM component. Which in my opinion makes sense since it is purely a C++ library.

Therefore my recommendation of wrapping directly the C++ API you need from DirectX makes a lot of sense. The direct benefit is that your code should migrate easily from a version of DirectX to the next.

From:manus_eiffel    Date:2009/03/02    Download   
Just to clarify, if we can find the UUID of the COM interface, then we can fix the TLB of DirectX and regenerate the wrapper using the COM wizard. However I'm not sure how we can find the right UUID.

From:manus_eiffel    Date:2009/03/02    Download   
For reference, looks like it can also fail in VB http://www.vbforums.com/showthread.php?t=477972 with the same reason.

Debugging it, I can only say it is a bug in the TLB from DirectX which has the wrong UIID for the Sprite interface. What happens is that the creation of the sprite works, but then for the internal of EiffelCOM we need to query its interface and it fails. The C project you are referring to does not do the check and thus works.

I'm not sure how much of DirectX you are actually using, but most of it could be rewritten without using COM, but just a plain C++ encapsulation as it is done in the C project you are referencing.

Until we know exactly the UUID for the interface that DirectX is actually generating, there is not much we can do to solve that problem.

Have you tried to use a more recent version of DirectX? They might have fixed this problem.

From:hcater    Date:2009/02/16    Download   
I've never actually tested this code in previous versions of EiffelCOM.  

I tested it thoroughly though and even though I may have erred I do think this is not a fault with the provided code but rather the EiffelCOM wrapping of the dx8vb.dll and/or the COM implementation itself.

For additional reference, this code is based on a C++ example found here that I can confirm works on my end but seems to fail in my translation to Eiffel at the point described.

http://www.codeproject.com/KB/directx/2dSprite.aspx

I've really got my fingers crossed that this can be resolved, thanks.

From:manus_eiffel    Date:2009/02/16    Status: Analyzed    Download   
Just to be certain, this code worked fine in your previous version of EiffelCOM? If so, which version was this?

From:hcater    Date:2009/02/04    Download   
Attachments for problem report #15365

Attachment: error.zip     Size:491850