'IDispatch' : no GUID has been associated with this object

Hi,

I'm having some problems building an application targeted towards the Pocket PC SDK. I import two typelibs, and everything works fine if I build for Pocket PC 2002. If I change to Pocket PC (the really old version that comes with EVC 3.0 [the original, not 2002]) I immediatelly get:

TypeLib1.tlh: error C2787: 'IDispatch' : no GUID has been associated with this object

TypeLib2.tlh: error C2787: 'IDispatch' : no GUID has been associated with this object

The obvious question is of course: why And how do I get rid of the error

Thanks in advance,

Nille



Answer this question

'IDispatch' : no GUID has been associated with this object

  • MA2005

    Here's what I've got so far:

    The IDispatch declaration in the Pocket PC SDK does not use __declspec(uuid(...)). Hence, the generated code in my client application should not use __uuidof(...) (for obvious reasons). This, for example, will not work:

    _COM_SMARTPTR_TYPEDEF(MyType, __uuidof(IDispatch));

    I read in [1] that it should be possible to force the compiler to use the older version (ATL version < 3.0) by defining _ATL_NO_UUIDOF. That, however, does not work. I still generates __uuidof(IDispatch).

    Any ideas

    /Nille

    [1] http://www.kbalertz.com/192561/Error.C2787.Building.Project.Using.aspx


  • 'IDispatch' : no GUID has been associated with this object