> Thanks Ehsan, this is a lot easier than setting breakpoints in the ATL
> code. However I have a small problem with this; all 'known' interface
> name (IUnknown, ...) are printed ok but my own interface aren't
> displayed - I get something like this:
>
> CMyClass - IUnknown
> CMyClass- IMarshal - failed
> CMyClass- - failed
> CMyClass- IUnknown
> CMyClass- IStdMarshalInfo - failed
> CMyClass- IExternalConnection - failed
> CMyClass- - failed
> CMyClass-
>
> That last line is my own interface (I saw the iid in the
> debugger) but I'm not sure what the two failed ones are (they have a
> guid that is not in my program nor in the idl that I got that
> describes my 'black box'
> object). So I'd like to see a name, any idea on how to do that?

Doesn't ATL's trace show the GUID for those interfaces?

To see their name, you should have them registered on your computer, and
then that information is available at HKEY_CLASSES_ROOT\Interfaces.

> Also, I have a question what my COM_MAP should look like. I have this:
>
> BEGIN_COM_MAP(CMyClass)
>       COM_INTERFACE_ENTRY(IMyClass)
>       COM_INTERFACE_ENTRY(ISomeBaseClass)
>       COM_INTERFACE_ENTRY(ISomeBaseClass2)
> END_COM_MAP()
>
> where ISomeBaseClass2 is derived from ISomeBaseClass and IMyClass is
> derived from ISomeBaseClass. Do I need to put them all in the COM_MAP
> or are the first two enough? Thanks.

You should list them all.  The rule of thumb is *any* interface that you
support on QueryInterface( ) must appear there, and inheritance does not
work as you expect.  For example, if you have:

 [uuid(...)] interface my_iface2 : my_iface1 {}

Both my_iface1 and my_iface2 must appear in the COM_MAP.  If you just list
my_iface2 (and rely on inheritance to recognize my_iface1 as well, then all
queries for my_iface1 will fail.

-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

To talk about oneself a great deal can also be a means of concealing
oneself.
-Beyond Good And Evil, F. W. Nietzsche




_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.

Reply via email to