3

mingw プロジェクトから imapi2 com オブジェクトにアクセスしようとしています。私はビジュアルスタジオの例に従おうとしていました。Microsoft SDK 7.1 で imapi2 ヘッダー ファイルを見つけましたが、uuid がないようです。私が見た例は、オブジェクトを作成するときに uuid を見つけるために __uuidof を使用していました。このような:

CoCreateInstance(__uuidof(MsftDiscMaster2), NULL, CLSCTX_INPROC_SERVER, __uuidof(IDiscMaster2), (void**) &m_discMaster);

しかし、 __uuidof が原因で常にエラーが発生します

_GUID const& __mingw_uuidof() への未定義の参照。

しかし、__mingw_uuidof は次のように定義されています ...

#define __CRT_UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)           \
    extern "C++" {                                                      \
    template<> inline const GUID &__mingw_uuidof<type>() {              \
        static const IID __uuid_inst = {l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8}}; \
        return __uuid_inst;                                             \
    }                                                                   \
    template<> inline const GUID &__mingw_uuidof<type*>() {             \
        return __mingw_uuidof<type>();                                  \
    }                                                                  \
    }

... _mingw.ha の "#define __uuidof(type) __mingw_uuidof<__typeof(type)>()" から数行上

__mingw_uuidof の mingw 定義が機能しないのはなぜですか?

SDKヘッダーファイルでDiscMasterのようなimapiオブジェクトのuuidを見つける方法はありますか? または、別のヘッダー ファイルを取得する必要がありますか。

ありがとう

4

1 に答える 1