Ignore:
Timestamp:
Aug 30, 2014, 7:14:36 AM (7 years ago)
Author:
roman
Message:

Proper code sharing between Spy and external dependencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/RunEvent.h

    r310 r312  
    199199};
    200200
    201 #if defined(DIRECTSHOWSPY_IRUNXXX_TEMPLATE)
    202 
    203 ////////////////////////////////////////////////////////////
    204 // CRunPropertyBagAwareT
    205 
    206 template <typename T>
    207 class ATL_NO_VTABLE CRunPropertyBagAwareT :
    208         public IDispatchImpl<AlaxInfoDirectShowSpy::IRunPropertyBagAware, &__uuidof(AlaxInfoDirectShowSpy::IRunPropertyBagAware), &__uuidof(AlaxInfoDirectShowSpy::__AlaxInfoDirectShowSpy)>
    209 {
    210 public:
    211 // CRunPropertyBagAwareT
    212 
    213 // AlaxInfoDirectShowSpy::IRunPropertyBagAware
    214         STDMETHOD(get_Value)(IUnknown** ppPropertyBagUnknown)
    215         {
    216                 _Z4(atlTraceCOM, 4, _T("...\n"));
    217                 _ATLTRY
    218                 {
    219                         __D(ppPropertyBagUnknown, E_POINTER);
    220                         T* pT = static_cast<T*>(this);
    221                         *ppPropertyBagUnknown = (IPropertyBag*) pT->CreatePerformancePropertyBag().Detach();
    222                 }
    223                 _ATLCATCH(Exception)
    224                 {
    225                         _C(Exception);
    226                 }
    227                 return S_OK;
    228         }
    229 };
     201#if !defined(DIRECTSHOWSPY)
    230202
    231203////////////////////////////////////////////////////////////
     
    234206template <typename T>
    235207class ATL_NO_VTABLE CRunEventAwareT :
    236         public IDispatchImpl<AlaxInfoDirectShowSpy::IRunEventAware, &__uuidof(AlaxInfoDirectShowSpy::IRunEventAware), &__uuidof(AlaxInfoDirectShowSpy::__AlaxInfoDirectShowSpy)>
     208        public IDispatchImpl<DIRECTSHOWSPY_NAMESPACE_PREFIX IRunEventAware, &__uuidof(DIRECTSHOWSPY_NAMESPACE_PREFIX IRunEventAware), &__uuidof(DIRECTSHOWSPY_NAMESPACE_PREFIX __AlaxInfoDirectShowSpy)>
    237209{
    238210protected:
     
    293265};
    294266
    295 #endif // defined(DIRECTSHOWSPY_IRUNXXX_TEMPLATE)
     267#endif // !defined(DIRECTSHOWSPY)
Note: See TracChangeset for help on using the changeset viewer.