IInputObject problem 
Author Message
 IInputObject problem

Using VC7/ATL. I have a COM class that implements IInputSite but I am
getting an error C2787 on the interface map:

#include <shlobj.h>
..

BEGIN_COM_MAP(MyCoClass)
..
    COM_INTERFACE_ENTRY(IInputObject)        // error C2787: 'IInputObject'
: no GUID has been associated with this object
..
END_COM_MAP()



Sat, 26 Feb 2005 19:47:41 GMT  
 IInputObject problem
COM_INTERFACE_ENTRY relies on __uuidof, which in its turn relies on the
interface being declared with __declspec( uuid). In previous Platform
SDK versions, some shell interfaces failed to be so declared. I believe
it is fixed in the latest SDK.

Thus, you can either download and install the latest Platform SDK, or
use COM_INTERFACE_ENTRY_IID and specify the IID explicitly.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Using VC7/ATL. I have a COM class that implements IInputSite but I am
> getting an error C2787 on the interface map:

> #include <shlobj.h>
> ..

> BEGIN_COM_MAP(MyCoClass)
> ..
>     COM_INTERFACE_ENTRY(IInputObject)        // error C2787:
'IInputObject'
> : no GUID has been associated with this object
> ..
> END_COM_MAP()



Sat, 26 Feb 2005 22:42:07 GMT  
 IInputObject problem
Hi. Thanks for the reply.
What would be the best way to update the platform sdk for VS.NET? I don't
want to have two copies of it on my hard drive.


Quote:
> COM_INTERFACE_ENTRY relies on __uuidof, which in its turn relies on the
> interface being declared with __declspec( uuid). In previous Platform
> SDK versions, some shell interfaces failed to be so declared. I believe
> it is fixed in the latest SDK.

> Thus, you can either download and install the latest Platform SDK, or
> use COM_INTERFACE_ENTRY_IID and specify the IID explicitly.
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



> > Using VC7/ATL. I have a COM class that implements IInputSite but I am
> > getting an error C2787 on the interface map:

> > #include <shlobj.h>
> > ..

> > BEGIN_COM_MAP(MyCoClass)
> > ..
> >     COM_INTERFACE_ENTRY(IInputObject)        // error C2787:
> 'IInputObject'
> > : no GUID has been associated with this object
> > ..
> > END_COM_MAP()



Mon, 28 Feb 2005 06:40:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. problems problems problems

2. Problems, problems, problems!

3. Problems, problems problems

4. Problems, Problems, Problems

5. VC6 to VC7 migration problem (problem with ATL and MFC)

6. Problem #30 on http://cs.nmu.edu/programming/c/problems.htm

7. Problem...Problem!

8. Problem with problem

9. Problem with Problem

10. Array size problems (memory problem)

 

 
Powered by phpBB® Forum Software