Alax.Info ATL/WTL Utilities is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

Commit 294

User picture
  • Author: alax
  • 2011-07-22 16:21 (almost 3 years ago)

- changed private registry path
- black list aware COM creators

Files Affected

 
293294
125
};
125
};
126
 
126
 
127
////////////////////////////////////////////////////////////
127
////////////////////////////////////////////////////////////
128
// UpdateRegistryFromResource
128
// TreatAsUpdateRegistryFromResource
129
 
129
 
130
template <typename T>
130
template <typename T>
131
inline VOID TreatAsUpdateRegistryFromResource(const CLSID& TreatAsClassIdentifier, BOOL bRegister)
131
inline VOID TreatAsUpdateRegistryFromResource(const CLSID& TreatAsClassIdentifier, BOOL bRegister)
...
 
...
 
176
}
176
}
177
 
177
 
178
////////////////////////////////////////////////////////////
178
////////////////////////////////////////////////////////////
 
 
179
// CBlackListAwareComCreatorT
 
 
180
 
 
 
181
template <typename T, const CLSID* t_pClassIdentifier>
 
 
182
class ATL_NO_VTABLE CTransparentCoClassT
 
 
183
{
 
 
184
public:
 
 
185
// CTransparentCoClassT
 
 
186
    static HINSTANCE CoLoadOriginalLibrary()
 
 
187
    {
 
 
188
        const HINSTANCE hModule = CoLoadLibrary(const_cast<LPOLESTR>((LPCOLESTR) CT2COLE(T::GetOriginalLibraryName())), TRUE);
 
 
189
        __E(hModule);
 
 
190
        return hModule;
 
 
191
    }
 
 
192
    static CComPtr<IUnknown> CoCreateOriginalInstance(HINSTANCE hModule, IUnknown* pControllingUnknown = NULL)
 
 
193
    {
 
 
194
        typedef HRESULT (WINAPI *DLLGETCLASSOBJECT)(REFCLSID, REFIID, VOID**);
 
 
195
        DLLGETCLASSOBJECT DllGetClassObject = (DLLGETCLASSOBJECT) GetProcAddress(hModule, "DllGetClassObject");
 
 
196
        __E(DllGetClassObject);
 
 
197
        CComPtr<IClassFactory> pClassFactory;
 
 
198
        __C(DllGetClassObject(*t_pClassIdentifier, __uuidof(IClassFactory), (VOID**) &pClassFactory));
 
 
199
        _A(pClassFactory);
 
 
200
        CComPtr<IUnknown> pUnknown;
 
 
201
        __C(pClassFactory->CreateInstance(pControllingUnknown, __uuidof(IUnknown), (VOID**) &pUnknown));
 
 
202
        return pUnknown;
 
 
203
    }
 
 
204
    static CComPtr<IUnknown> CoCreateOriginalInstance(IUnknown* pControllingUnknown = NULL)
 
 
205
    {
 
 
206
        CComPtr<IUnknown> pUnknown;
 
 
207
        const HINSTANCE hModule = CoLoadOriginalLibrary();
 
 
208
        _ATLTRY
 
 
209
        {
 
 
210
            pUnknown = CoCreateOriginalInstance(hModule, pControllingUnknown);
 
 
211
        }
 
 
212
        _ATLCATCHALL()
 
 
213
        {
 
 
214
            CoFreeLibrary(hModule);
 
 
215
            _ATLRETHROW;
 
 
216
        }
 
 
217
        CoFreeLibrary(hModule);
 
 
218
        return pUnknown;
 
 
219
    }
 
 
220
};
 
 
221
 
 
 
222
////////////////////////////////////////////////////////////
 
 
223
// CBlackListAwareComCreatorT
 
 
224
 
 
 
225
template <typename _ObjectClass, typename _Class, LPCTSTR* t_ppszName>
 
 
226
class CBlackListAwareComCreatorT :
 
 
227
    public CComCreator<_ObjectClass>
 
 
228
{
 
 
229
public:
 
 
230
// CBlackListAwareComCreatorT
 
 
231
    static HRESULT WINAPI CreateInstance(VOID* pvControllingUnknown, REFIID InterfaceIdentifier, VOID** ppvObject) throw()
 
 
232
    {
 
 
233
        _A(ppvObject);
 
 
234
        *ppvObject = NULL;
 
 
235
        #pragma region Check Black List
 
 
236
        static INT g_nBlackListed = 0; // 0 Unknown, 1 No, 2 Yes
 
 
237
        {
 
 
238
            _A(_pAtlModule);
 
 
239
            CComCritSecLock<CComCriticalSection> Lock(_pAtlModule->m_csStaticDataInitAndTypeInfo);
 
 
240
            if(!g_nBlackListed)
 
 
241
            {
 
 
242
                TCHAR pszPath[MAX_PATH] = { 0 };
 
 
243
                _W(GetModuleFileName(NULL, pszPath, DIM(pszPath)));
 
 
244
                LPTSTR pszFileName = FindFileName(pszPath);
 
 
245
                _A(pszFileName);
 
 
246
                RemoveExtension(pszFileName);
 
 
247
                const CString sBlackList = _RegKeyHelper::QueryStringValue(HKEY_LOCAL_MACHINE, REGISTRY_ROOT, AtlFormatString(_T("%s Black List"),
*t_ppszName));
 
 
248
                CRoArrayT<CString> BlackListArray;
 
 
249
                _StringHelper::GetCommaSeparatedItems(sBlackList, BlackListArray);
 
 
250
                BOOL bFound = FALSE;
 
 
251
                for(SIZE_T nIndex = 0; nIndex < BlackListArray.GetCount(); nIndex++)
 
 
252
                {
 
 
253
                    CPath sFileName = (LPCTSTR) BlackListArray[nIndex];
 
 
254
                    sFileName.RemoveExtension();
 
 
255
                    if(_tcsicmp(sFileName, pszFileName) == 0)
 
 
256
                    {
 
 
257
                        _Z2(atlTraceCOM, 2, _T("Will instantiate original COM class, sFileName \"%s\"\n"), sFileName);
 
 
258
                        bFound = TRUE;
 
 
259
                        break;
 
 
260
                    }
 
 
261
                }
 
 
262
                g_nBlackListed = bFound ? 2 : 1;
 
 
263
            }
 
 
264
        }
 
 
265
        #pragma endregion 
 
 
266
        if(g_nBlackListed == 2)
 
 
267
            #pragma region CoCreateInstance Original Class
 
 
268
            _ATLTRY
 
 
269
            {
 
 
270
                _A(_pAtlModule);
 
 
271
                const LONG nLockResult = _pAtlModule->Lock();
 
 
272
                _ATLTRY
 
 
273
                {
 
 
274
                    CComPtr<IUnknown> pUnknown = _Class::CoCreateOriginalInstance((IUnknown*) pvControllingUnknown);
 
 
275
                    if(InterfaceIdentifier == __uuidof(IUnknown))
 
 
276
                        *ppvObject = pUnknown.Detach();
 
 
277
                    else
 
 
278
                        __C(pUnknown->QueryInterface(InterfaceIdentifier, ppvObject));
 
 
279
                }
 
 
280
                _ATLCATCHALL()
 
 
281
                {
 
 
282
                    _pAtlModule->Unlock();
 
 
283
                    _ATLRETHROW;
 
 
284
                }
 
 
285
                const LONG nUnlockResult = _pAtlModule->Unlock();
 
 
286
                _Z4(atlTraceGeneral, 6-2, _T("nLockResult %d, nUnlockResult %d\n"), nLockResult, nUnlockResult);
 
 
287
                return S_OK;
 
 
288
            }
 
 
289
            _ATLCATCH(Exception)
 
 
290
            {
 
 
291
                _A(FAILED(Exception));
 
 
292
                _C(Exception);
 
 
293
            }
 
 
294
            #pragma endregion 
 
 
295
        return __super::CreateInstance(pvControllingUnknown, InterfaceIdentifier, ppvObject);
 
 
296
    }
 
 
297
};
 
 
298
 
 
 
299
////////////////////////////////////////////////////////////
179
// CHookHostT
300
// CHookHostT
180
 
301
 
181
template <typename T, typename IHook, LPCTSTR* t_ppszHookName>
302
template <typename T, typename IHook, LPCTSTR* t_ppszHookName>
293294
21
class ATL_NO_VTABLE CSpyT :
21
class ATL_NO_VTABLE CSpyT :
22
    public CComObjectRootEx<CComMultiThreadModel>,
22
    public CComObjectRootEx<CComMultiThreadModel>,
23
    //public CComCoClass<CSpyT, &CLSID_Spy>,
23
    //public CComCoClass<CSpyT, &CLSID_Spy>,
 
 
24
    public CTransparentCoClassT<T, t_pFilterGraphClassIdentifier>,
24
    public IDispatchImpl<ISpy>,
25
    public IDispatchImpl<ISpy>,
25
    public IFilterGraph2,
26
    public IFilterGraph2,
26
    public IDispatchImpl<IMediaControl, &__uuidof(IMediaControl), &__uuidof(Quartz::__QuartzTypeLib)>,
27
    public IDispatchImpl<IMediaControl, &__uuidof(IMediaControl), &__uuidof(Quartz::__QuartzTypeLib)>,
...
 
...
 
37
public:
38
public:
38
    //enum { IDR = IDR_FILTERGRAPHSPY };
39
    //enum { IDR = IDR_FILTERGRAPHSPY };
39
 
40
 
 
 
41
//DECLARE_CLASSFACTORY(...
 
 
42
 
 
 
43
//DECLARE_AGGREGATABLE(...
 
 
44
 
40
//DECLARE_REGISTRY_RESOURCEID(IDR)
45
//DECLARE_REGISTRY_RESOURCEID(IDR)
41
 
46
 
42
DECLARE_PROTECT_FINAL_CONSTRUCT()
47
DECLARE_PROTECT_FINAL_CONSTRUCT()
...
 
...
 
91
        }
96
        }
92
        ~CAmGraphBuilderCallback() throw()
97
        ~CAmGraphBuilderCallback() throw()
93
        {
98
        {
94
            _Z5(atlTraceRefcount, 5, _T("this 0x%p\n"), this);
99
            _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this);
95
        }
100
        }
96
        VOID Initialize(T* pSpy) throw()
101
        VOID Initialize(T* pSpy) throw()
97
        {
102
        {
 
 
103
            _A(pSpy);
98
            CRoCriticalSectionLock DataLock(m_DataCriticalSection);
104
            CRoCriticalSectionLock DataLock(m_DataCriticalSection);
99
            _A(!m_pSpy && pSpy);
105
            _Z4(atlTraceRefcount, 4, _T("this 0x%p, pSpy 0x%p\n"), this, pSpy);
 
 
106
            _A(!m_pSpy);
100
            m_pSpy = pSpy;
107
            m_pSpy = pSpy;
101
        }
108
        }
102
        VOID Terminate() throw()
109
        VOID Terminate() throw()
...
 
...
 
122
    // IAMGraphBuilderCallback
129
    // IAMGraphBuilderCallback
123
        STDMETHOD(SelectedFilter)(IMoniker* pMoniker) throw()
130
        STDMETHOD(SelectedFilter)(IMoniker* pMoniker) throw()
124
        {
131
        {
125
            _Z4(atlTraceCOM, 4, _T("pMoniker %ls\n"), _FilterGraphHelper::GetMonikerDisplayName(pMoniker));
132
            _Z4(atlTraceCOM, 4, _T("this 0x%p, pMoniker %ls\n"), this, _FilterGraphHelper::GetMonikerDisplayName(pMoniker));
126
            _ATLTRY
133
            _ATLTRY
127
            {
134
            {
128
                _A(pMoniker);
135
                _A(pMoniker);
...
 
...
 
143
        }
150
        }
144
        STDMETHOD(CreatedFilter)(IBaseFilter* pBaseFilter) throw()
151
        STDMETHOD(CreatedFilter)(IBaseFilter* pBaseFilter) throw()
145
        {
152
        {
146
            _Z4(atlTraceCOM, 4, _T("pBaseFilter %ls \"%ls\"\n"), _FilterGraphHelper::GetFilterClassIdentifierString(pBaseFilter), _FilterGraphHelper::GetFilterName(pBaseFilter));
153
            _Z4(atlTraceCOM, 4, _T("this 0x%p, pBaseFilter 0x%p %ls \"%ls\"\n"), this, pBaseFilter, _FilterGraphHelper::GetFilterClassIdentifierString(pBaseFilter), _FilterGraphHelper::GetFilterName(pBaseFilter));
147
            _ATLTRY
154
            _ATLTRY
148
            {
155
            {
149
                _A(pBaseFilter);
156
                _A(pBaseFilter);
...
 
...
 
247
 
254
 
248
public:
255
public:
249
// CSpyT
256
// CSpyT
 
 
257
    static LPCTSTR GetOriginalLibraryName() throw()
 
 
258
    {
 
 
259
        return _T("quartz.dll");
 
 
260
    }
250
    static CString GetObjectFriendlyName()
261
    static CString GetObjectFriendlyName()
251
    {
262
    {
252
        return _StringHelper::GetLine(T::IDR, 2);
263
        return _StringHelper::GetLine(T::IDR, 2);
...
 
...
 
283
            TCHAR pszPath[MAX_PATH] = { 0 };
294
            TCHAR pszPath[MAX_PATH] = { 0 };
284
            _W(GetModuleFileName(NULL, pszPath, DIM(pszPath)));
295
            _W(GetModuleFileName(NULL, pszPath, DIM(pszPath)));
285
            _Z4(atlTraceRefcount, 4, _T("pszPath \"%s\", this 0x%08x, m_dwRef %d, m_bIsAggregated %d\n"), pszPath, this, m_dwRef,
m_bIsAggregated);
296
            _Z4(atlTraceRefcount, 4, _T("pszPath \"%s\", this 0x%08x, m_dwRef %d, m_bIsAggregated %d\n"), pszPath, this, m_dwRef,
m_bIsAggregated);
286
            const HINSTANCE hModule = CoLoadLibrary(_T("quartz.dll"), TRUE);
297
            const HINSTANCE hModule = CoLoadOriginalLibrary();
287
            _ATLTRY
298
            _ATLTRY
288
            {
299
            {
289
                typedef HRESULT (WINAPI *DLLGETCLASSOBJECT)(REFCLSID, REFIID, VOID**);
300
                _A(hModule);
290
                DLLGETCLASSOBJECT DllGetClassObject = (DLLGETCLASSOBJECT) GetProcAddress(hModule, "DllGetClassObject");
 
 
291
                __E(DllGetClassObject);
 
 
292
                CComPtr<IClassFactory> pClassFactory;
 
 
293
                __C(DllGetClassObject(*t_pFilterGraphClassIdentifier, __uuidof(IClassFactory), (VOID**) &pClassFactory));
 
 
294
                _A(pClassFactory);
 
 
295
                const CComPtr<IUnknown> pControllingUnknown = GetControllingUnknown();
301
                const CComPtr<IUnknown> pControllingUnknown = GetControllingUnknown();
296
                #pragma region Instantiation
302
                #pragma region Instantiation
297
                {
303
                {
298
                    { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release();
_Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
304
                    { const ULONG nAddRefCount = pControllingUnknown.p->AddRef(); const ULONG nReleaseCount = pControllingUnknown.p->Release();
_Z5(atlTraceRefcount, 5, _T("m_dwRef 0x%x, AddRef %d, Release %d\n"), m_dwRef, nAddRefCount, nReleaseCount); }
299
                    CComPtr<IUnknown> pUnknown;
305
                    const CComPtr<IUnknown> pUnknown = CoCreateOriginalInstance(hModule, pControllingUnknown);
300
                    __C(pClassFactory->CreateInstance(pControllingUnknown, __uuidof(IUnknown), (VOID**) &pUnknown));
 
 
301
                    // NOTE: DirectShow FilterGraph is incorrectly implementing COM aggregation adding outer reference to interfaces queried from private
IUnknown
306
                    // NOTE: DirectShow FilterGraph is incorrectly implementing COM aggregation adding outer reference to interfaces queried from private
IUnknown
302
                    CComQIPtr<IFilterGraph2> pFilterGraph2 = pUnknown;
307
                    CComQIPtr<IFilterGraph2> pFilterGraph2 = pUnknown;
303
                    __D(pFilterGraph2, E_NOINTERFACE);
308
                    __D(pFilterGraph2, E_NOINTERFACE);
...
 
...
 
481
// IFilterGraph
486
// IFilterGraph
482
    STDMETHOD(AddFilter)(IBaseFilter* pBaseFilter, LPCWSTR pszName) throw()
487
    STDMETHOD(AddFilter)(IBaseFilter* pBaseFilter, LPCWSTR pszName) throw()
483
    {
488
    {
484
        _Z4(atlTraceCOM, 4, _T("pBaseFilter 0x%08x, pszName \"%s\"\n"), pBaseFilter, CString(pszName));
489
        _Z4(atlTraceCOM, 4, _T("this 0x%p, pBaseFilter 0x%08x, pszName \"%s\"\n"), this, pBaseFilter, CString(pszName));
485
        ReleaseTemporaryUnknown();
490
        ReleaseTemporaryUnknown();
486
        HOOK_PROLOG(CFilterGraphAddRemoveHookHost)
491
        HOOK_PROLOG(CFilterGraphAddRemoveHookHost)
487
            OnAddFilter(pT, pBaseFilter, pszName, &bDefault);
492
            OnAddFilter(pT, pBaseFilter, pszName, &bDefault);
...
 
...
 
490
    }
495
    }
491
    STDMETHOD(RemoveFilter)(IBaseFilter* pBaseFilter) throw()
496
    STDMETHOD(RemoveFilter)(IBaseFilter* pBaseFilter) throw()
492
    {
497
    {
493
        _Z4(atlTraceCOM, 4, _T("pBaseFilter 0x%08x\n"), pBaseFilter);
498
        _Z4(atlTraceCOM, 4, _T("this 0x%p, pBaseFilter 0x%08x\n"), this, pBaseFilter);
494
        if(pBaseFilter)
499
        if(pBaseFilter)
495
            _ATLTRY
500
            _ATLTRY
496
            {
501
            {
...
 
...
 
789
public:
794
public:
790
    enum { IDR = IDR_FILTERGRAPHSPY };
795
    enum { IDR = IDR_FILTERGRAPHSPY };
791
 
796
 
 
 
797
private:
 
 
798
    static LPCTSTR g_pszClassName;
 
 
799
 
792
public:
800
public:
 
 
801
    //typedef CBlackListAwareComCreatorT<CComObjectCached<CSpy>, CSpy, &g_pszClassName> _ClassFactoryCreatorClass; // DECLARE_CLASSFACTORY
override
 
 
802
    typedef CComCreator2<CBlackListAwareComCreatorT<CComObject<CSpy>, CSpy, &g_pszClassName>,
CBlackListAwareComCreatorT<CComAggObject<CSpy>, CSpy, &g_pszClassName> > _CreatorClass; // DECLARE_AGGREGATABLE override
 
 
803
 
 
 
804
public:
793
// CSpy
805
// CSpy
794
};
806
};
795
 
807
 
 
 
808
__declspec(selectany) LPCTSTR CSpy::g_pszClassName = _T("CSpy");
 
 
809
 
796
OBJECT_ENTRY_AUTO(__uuidof(Spy), CSpy)
810
OBJECT_ENTRY_AUTO(__uuidof(Spy), CSpy)
797
 
811
 
798
////////////////////////////////////////////////////////////
812
////////////////////////////////////////////////////////////
...
 
...
 
805
public:
819
public:
806
    enum { IDR = IDR_NOTHREADFILTERGRAPHSPY };
820
    enum { IDR = IDR_NOTHREADFILTERGRAPHSPY };
807
 
821
 
 
 
822
private:
 
 
823
    static LPCTSTR g_pszClassName;
 
 
824
 
808
public:
825
public:
 
 
826
    //typedef CBlackListAwareComCreatorT<CComObjectCached<CNoThreadSpy>, CNoThreadSpy, &g_pszClassName> _ClassFactoryCreatorClass; //
DECLARE_CLASSFACTORY override
 
 
827
    typedef CComCreator2<CBlackListAwareComCreatorT<CComObject<CNoThreadSpy>, CNoThreadSpy, &g_pszClassName>,
CBlackListAwareComCreatorT<CComAggObject<CNoThreadSpy>, CNoThreadSpy, &g_pszClassName> > _CreatorClass; // DECLARE_AGGREGATABLE override
 
 
828
 
 
 
829
public:
809
// CNoThreadSpy
830
// CNoThreadSpy
810
};
831
};
811
 
832
 
 
 
833
__declspec(selectany) LPCTSTR CNoThreadSpy::g_pszClassName = _T("CNoThreadSpy");
 
 
834
 
812
OBJECT_ENTRY_AUTO(__uuidof(NoThreadSpy), CNoThreadSpy)
835
OBJECT_ENTRY_AUTO(__uuidof(NoThreadSpy), CNoThreadSpy)
293294
18
class ATL_NO_VTABLE CFilterMapperSpyT :
18
class ATL_NO_VTABLE CFilterMapperSpyT :
19
    public CComObjectRootEx<CComMultiThreadModel>,
19
    public CComObjectRootEx<CComMultiThreadModel>,
20
    //public CComCoClass<CFilterMapperSpyT, &CLSID_FilterMapperSpy>,
20
    //public CComCoClass<CFilterMapperSpyT, &CLSID_FilterMapperSpy>,
 
 
21
    public CTransparentCoClassT<T, t_pFilterMapperClassIdentifier>,
21
    public IDispatchImpl<IFilterMapperSpy>,
22
    public IDispatchImpl<IFilterMapperSpy>,
22
    public IAMFilterData,
23
    public IAMFilterData,
23
    public IFilterMapper2
24
    public IFilterMapper2
...
 
...
 
78
 
79
 
79
public:
80
public:
80
// CFilterMapperSpyT
81
// CFilterMapperSpyT
 
 
82
    static LPCTSTR GetOriginalLibraryName() throw()
 
 
83
    {
 
 
84
        return _T("quartz.dll");
 
 
85
    }
81
    static CString GetObjectFriendlyName()
86
    static CString GetObjectFriendlyName()
82
    {
87
    {
83
        return _StringHelper::GetLine(T::IDR, 2);
88
        return _StringHelper::GetLine(T::IDR, 2);
...
 
...
 
121
                CComPtr<IClassFactory> pClassFactory;
126
                CComPtr<IClassFactory> pClassFactory;
122
                __C(DllGetClassObject(*t_pFilterMapperClassIdentifier, __uuidof(IClassFactory), (VOID**) &pClassFactory));
127
                __C(DllGetClassObject(*t_pFilterMapperClassIdentifier, __uuidof(IClassFactory), (VOID**) &pClassFactory));
123
                _A(pClassFactory);
128
                _A(pClassFactory);
124
                CComPtr<IUnknown> pControllingUnknown = GetControllingUnknown();
129
                const CComPtr<IUnknown> pControllingUnknown = GetControllingUnknown();
125
                {
130
                {
126
                    CComPtr<IUnknown> pUnknown;
131
                    CComPtr<IUnknown> pUnknown;
127
                    __C(pClassFactory->CreateInstance(pControllingUnknown, __uuidof(IUnknown), (VOID**) &pUnknown));
132
                    __C(pClassFactory->CreateInstance(pControllingUnknown, __uuidof(IUnknown), (VOID**) &pUnknown));
128
                    CComQIPtr<IFilterMapper2> pFilterMapper2 = pUnknown;
133
                    const CComQIPtr<IFilterMapper2> pFilterMapper2 = pUnknown;
129
                    __D(pFilterMapper2, E_NOINTERFACE);
134
                    __D(pFilterMapper2, E_NOINTERFACE);
130
                    pFilterMapper2.p->Release();
135
                    pFilterMapper2.p->Release();
131
                    CComQIPtr<IAMFilterData> pAmFilterData = pUnknown;
136
                    const CComQIPtr<IAMFilterData> pAmFilterData = pUnknown;
132
                    __D(pAmFilterData, E_NOINTERFACE);
137
                    __D(pAmFilterData, E_NOINTERFACE);
133
                    pAmFilterData.p->Release();
138
                    pAmFilterData.p->Release();
134
                    m_pInnerUnknown = pUnknown;
139
                    m_pInnerUnknown = pUnknown;
...
 
...
 
298
public:
303
public:
299
    enum { IDR = IDR_FILTERMAPPERSPY };
304
    enum { IDR = IDR_FILTERMAPPERSPY };
300
 
305
 
 
 
306
private:
 
 
307
    static LPCTSTR g_pszClassName;
 
 
308
 
301
public:
309
public:
 
 
310
    //typedef CBlackListAwareComCreatorT<CComObjectCached<CFilterMapperSpy>, CFilterMapperSpy, &g_pszClassName> _ClassFactoryCreatorClass; //
DECLARE_CLASSFACTORY override
 
 
311
    typedef CComCreator2<CBlackListAwareComCreatorT<CComObject<CFilterMapperSpy>, CFilterMapperSpy, &g_pszClassName>,
CBlackListAwareComCreatorT<CComAggObject<CFilterMapperSpy>, CFilterMapperSpy, &g_pszClassName> > _CreatorClass; // DECLARE_AGGREGATABLE
override
 
 
312
 
 
 
313
public:
302
// CFilterMapperSpy
314
// CFilterMapperSpy
303
};
315
};
304
 
316
 
 
 
317
__declspec(selectany) LPCTSTR CFilterMapperSpy::g_pszClassName = _T("CFilterMapperSpy");
 
 
318
 
305
OBJECT_ENTRY_AUTO(__uuidof(FilterMapperSpy), CFilterMapperSpy)
319
OBJECT_ENTRY_AUTO(__uuidof(FilterMapperSpy), CFilterMapperSpy)
306
 
320
 
293294
66
// Alax.Info ATL/WTL
66
// Alax.Info ATL/WTL
67
 
67
 
68
#define REGISTRY_PRODUCTROOT    _T("SOFTWARE\\Alax.Info\\Utilities")
68
#define REGISTRY_PRODUCTROOT    _T("SOFTWARE\\Alax.Info\\Utilities")
69
#define REGISTRY_FILEROOT        REGISTRY_PRODUCTROOT
69
#define REGISTRY_FILEROOT        REGISTRY_PRODUCTROOT _T("\\DirectShowSpy")
70
#define REGISTRY_ROOT            REGISTRY_FILEROOT
70
#define REGISTRY_ROOT            REGISTRY_FILEROOT
71
 
71
 
72
#include "roatlbase.h"
72
#include "roatlbase.h"