comptr_traits.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:2k
- ////////////////////////////////////////
- //
- // Defines traits for accessing IID values associated with
- // a given interface. For use wiht comptr.
- //
- // A trait is needed for use by comptr::From()
- //
- #if !defined(comptr_traits_inc__)
- #define comptr_traits_inc__
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include "hxcom.h"
- #include "hxtypes.h"
- #include "hxresult.h"
- #include "hxmon.h" //IHXRegistry
- #include "ihxpckts.h" //IHXValues
- #include "hxcore.h" //IHXPlayer
- #include "hxprefs.h" //IHXPreferences
- #include "hxerror.h" //IHXErrorSinkControl
- #include "hxausvc.h" //IHXAudioPlayer
- #include "hxccf.h" //IHXCommonClassFactory
- #include "ihxaccesspoint.h" //IHXAccessPointManager
- #include "hxsmbw.h" //IHXASMProps
- #include "hxgroup.h" //IHXGroupSink
- #include "comptr.h"
- // save-some-typing macro
- #define COMPTR_DEFINE_TRAIT(iid)
- struct IIDTraits<iid>
- {
- static inline IID_RETTYPE riid(){ return IID_##iid; }
- };
- namespace comptr_util
- {
- // add as needed
- COMPTR_DEFINE_TRAIT(IHXStreamSource)
- COMPTR_DEFINE_TRAIT(IHXStream)
- COMPTR_DEFINE_TRAIT(IHXPlayer)
- COMPTR_DEFINE_TRAIT(IHXPlayer2)
- COMPTR_DEFINE_TRAIT(IHXRegistryAltStringHandling)
- COMPTR_DEFINE_TRAIT(IHXRegistry)
- COMPTR_DEFINE_TRAIT(IHXPreferences)
- COMPTR_DEFINE_TRAIT(IHXBuffer)
- COMPTR_DEFINE_TRAIT(IHXValues)
- COMPTR_DEFINE_TRAIT(IHXErrorSinkControl)
- COMPTR_DEFINE_TRAIT(IHXClientEngineSetup)
- COMPTR_DEFINE_TRAIT(IHXAudioPlayer)
- COMPTR_DEFINE_TRAIT(IHXCommonClassFactory)
- COMPTR_DEFINE_TRAIT(IUnknown)
- COMPTR_DEFINE_TRAIT(IHXAccessPointManager)
- COMPTR_DEFINE_TRAIT(IHXASMProps)
- COMPTR_DEFINE_TRAIT(IHXGroupSink)
- COMPTR_DEFINE_TRAIT(IHXGroupManager)
- }
- #endif // !defined(comptr_traits_inc__)