1 | //////////////////////////////////////////////////////////// |
---|
2 | // Copyright (C) Roman Ryltsov, 2008-2014 |
---|
3 | // Created by Roman Ryltsov roman@alax.info, http://alax.info |
---|
4 | // |
---|
5 | // This source code is published to complement DirectShowSpy developer powertoy |
---|
6 | // and demonstrate the internal use of APIs and tricks powering the tool. It is |
---|
7 | // allowed to freely re-use the portions of the code in other projects, commercial |
---|
8 | // or otherwise (provided that you dont pretend that you wrote the original tool). |
---|
9 | // |
---|
10 | // Please keep in mind that DirectShowSpy is a developer tool, it is strongly recommended |
---|
11 | // that it is not shipped with release grade software. It is allowed to distribute |
---|
12 | // DirectShowSpy if only it is not registered with Windows by default and either |
---|
13 | // used privately, or registered on specific throubleshooting request. The advice applies |
---|
14 | // to hooking methods used by DirectShowSpy in general as well. |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | //////////////////////////////////////////////////////////// |
---|
19 | // Windows definitions |
---|
20 | |
---|
21 | #define STRICT |
---|
22 | #define INLINE_HRESULT_FROM_WIN32 |
---|
23 | #define _INC_WINDOWSX |
---|
24 | |
---|
25 | #include "targetver.h" |
---|
26 | |
---|
27 | //////////////////////////////////////////////////////////// |
---|
28 | // ATL definitions |
---|
29 | |
---|
30 | #define _ATL_APARTMENT_THREADED |
---|
31 | #define _ATL_NO_AUTOMATIC_NAMESPACE |
---|
32 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS |
---|
33 | #define _ATL_ALL_WARNINGS |
---|
34 | //#define _ATL_ATTRIBUTES |
---|
35 | |
---|
36 | #include "roatltrace.h" // Replacement for <atltrace.h> |
---|
37 | #include <atlbase.h> |
---|
38 | #include <atlcom.h> |
---|
39 | #include <atlwin.h> |
---|
40 | #include <atltypes.h> |
---|
41 | #include <atlsync.h> |
---|
42 | #include <atlfile.h> |
---|
43 | #include <atlpath.h> |
---|
44 | #include <atlcoll.h> |
---|
45 | #include <atlrx.h> |
---|
46 | #include <atlctl.h> |
---|
47 | //#include <atlhost.h> |
---|
48 | |
---|
49 | using namespace ATL; |
---|
50 | using namespace ATL::ATLPath; |
---|
51 | |
---|
52 | //////////////////////////////////////////////////////////// |
---|
53 | // WTL |
---|
54 | |
---|
55 | #define _SECURE_ATL TRUE |
---|
56 | #define _WTL_NO_CSTRING |
---|
57 | #define _WTL_NO_WTYPES |
---|
58 | #define _WTL_NO_UNION_CLASSES |
---|
59 | #define _WTL_NEW_PAGE_NOTIFY_HANDLERS |
---|
60 | |
---|
61 | #include <atlapp.h> |
---|
62 | #include <atlgdi.h> |
---|
63 | #include <atluser.h> |
---|
64 | #include <atlcrack.h> |
---|
65 | #include <atlctrls.h> |
---|
66 | #include <shellapi.h> |
---|
67 | #include <atlctrlx.h> |
---|
68 | #include <atlmisc.h> |
---|
69 | #include <atlframe.h> |
---|
70 | #include <atldlgs.h> |
---|
71 | |
---|
72 | using namespace WTL; |
---|
73 | |
---|
74 | //////////////////////////////////////////////////////////// |
---|
75 | // Alax.Info ATL/WTL |
---|
76 | |
---|
77 | #define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utility") |
---|
78 | #define REGISTRY_FILEROOT REGISTRY_PRODUCTROOT _T("\\DirectShowSpy") |
---|
79 | #define REGISTRY_ROOT REGISTRY_FILEROOT |
---|
80 | |
---|
81 | #include "roatlbase.h" |
---|
82 | #include "roatlvariants.h" |
---|
83 | #include "roatlcollections.h" |
---|
84 | #include "roatlcom.h" |
---|
85 | #include "roatlpersist.h" |
---|
86 | #include "roatlmisc.h" |
---|
87 | #include "roatlexceptionfilter.h" |
---|
88 | #include "rowtlapp.h" |
---|
89 | #include "rowtlcrack.h" |
---|
90 | #include "rodialogs.h" |
---|
91 | #include "rocontrols.h" |
---|
92 | |
---|
93 | //////////////////////////////////////////////////////////// |
---|
94 | // Common Controls |
---|
95 | |
---|
96 | #if defined _M_IX86 |
---|
97 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") |
---|
98 | #elif defined _M_IA64 |
---|
99 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") |
---|
100 | #elif defined _M_X64 |
---|
101 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") |
---|
102 | #else |
---|
103 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") |
---|
104 | #endif |
---|