OLD | NEW |
1 /** | 1 /** |
2 * \file ATL_Deprecate.h Include package for all the ATL headers, with optional
forwarding to detect ATL dependencies. | 2 * \file ATL_Deprecate.h Include package for all the ATL headers, with optional
forwarding to detect ATL dependencies. |
3 * | 3 * |
4 * This header is a nexus for refactoring work to remove ATL. | 4 * This header is a nexus for refactoring work to remove ATL. |
5 * In forwarding-disabled mode, this is simply includes the ATL headers. | 5 * In forwarding-disabled mode, this is simply includes the ATL headers. |
6 * With forwarding turned on, the ATL headers are included within a namespace. | 6 * With forwarding turned on, the ATL headers are included within a namespace. |
7 * The particular ATL items used are then manually reintroduced into visibility. | 7 * The particular ATL items used are then manually reintroduced into visibility. |
8 * This method allows explicitly enumerating each of the symbols required to get
the code to compile. | 8 * This method allows explicitly enumerating each of the symbols required to get
the code to compile. |
9 * | 9 * |
10 * When ATL is forwarded, the code does not link. | 10 * When ATL is forwarded, the code does not link. |
11 * The ATL DLL libraries expose symbols in the ATL namespace. | 11 * The ATL DLL libraries expose symbols in the ATL namespace. |
12 * The forwarded libraries use a different namespace. | 12 * The forwarded libraries use a different namespace. |
13 * Thus the external symbols do not match, and the linker reports unresolved ext
ernals. | 13 * Thus the external symbols do not match, and the linker reports unresolved ext
ernals. |
14 * If desired, these externals could be linked through proxy classes, | 14 * If desired, these externals could be linked through proxy classes, |
15 * although these are not written as yet. | 15 * although these are not written as yet. |
16 * The main purpose of this mechanism is to determine the exact scope of the ref
actoring effort. | 16 * The main purpose of this mechanism is to determine the exact scope of the ref
actoring effort. |
17 */ | 17 */ |
18 | 18 |
19 /* | 19 /* |
20 * NDEBUG is defined for release but not for debug, so release versions never fo
rward. | 20 * NDEBUG is defined for release but not for debug, so release versions never fo
rward. |
21 * Because the plugin doesn't link correctly with forwarding turned off, forward
ing is disabled by default even for debug. | 21 * Because the plugin doesn't link correctly with forwarding turned off, forward
ing is disabled by default even for debug. |
22 */ | 22 */ |
23 #define DISABLE_FORWARDING_FOR_DEBUG 1 | 23 #define DISABLE_FORWARDING_FOR_DEBUG 1 |
24 #define DISABLE_ATL_FORWARDING defined(NDEBUG) || DISABLE_FORWARDING_FOR_DEBUG | 24 #define DISABLE_ATL_FORWARDING defined(NDEBUG) || DISABLE_FORWARDING_FOR_DEBUG |
25 | 25 |
26 #if DISABLE_ATL_FORWARDING | 26 #if DISABLE_ATL_FORWARDING |
27 | 27 |
28 #include <atlbase.h> | 28 #include <atlbase.h> |
29 #include <atlstr.h> | |
30 #include <atltypes.h> | |
31 #include <atlcom.h> | 29 #include <atlcom.h> |
32 #include <atlhost.h> | 30 #include <atlhost.h> |
33 | 31 |
34 | |
35 #else | 32 #else |
36 | 33 |
37 /* | 34 /* |
38 * ATL requires the following includes in the global namespace. | 35 * ATL requires the following includes in the global namespace. |
39 */ | 36 */ |
40 #include <apiset.h> | 37 #include <apiset.h> |
41 #include <apisetcconv.h> | 38 #include <apisetcconv.h> |
42 #include <rpc.h> | 39 #include <rpc.h> |
43 #include <rpcndr.h> | 40 #include <rpcndr.h> |
44 #include <pshpack8.h> | 41 #include <pshpack8.h> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 using OLD_ATL::CComCreator; | 96 using OLD_ATL::CComCreator; |
100 using OLD_ATL::CComCreator2; | 97 using OLD_ATL::CComCreator2; |
101 using OLD_ATL::CComModule; | 98 using OLD_ATL::CComModule; |
102 using OLD_ATL::CComMultiThreadModel; | 99 using OLD_ATL::CComMultiThreadModel; |
103 using OLD_ATL::CComObject; | 100 using OLD_ATL::CComObject; |
104 using OLD_ATL::CComObjectNoLock; | 101 using OLD_ATL::CComObjectNoLock; |
105 using OLD_ATL::CComObjectRootEx; | 102 using OLD_ATL::CComObjectRootEx; |
106 using OLD_ATL::CComPtr; | 103 using OLD_ATL::CComPtr; |
107 using OLD_ATL::CComQIPtr; | 104 using OLD_ATL::CComQIPtr; |
108 using OLD_ATL::CComSingleThreadModel; | 105 using OLD_ATL::CComSingleThreadModel; |
109 using OLD_ATL::CRect; | |
110 using OLD_ATL::CSimpleArray; | 106 using OLD_ATL::CSimpleArray; |
111 using OLD_ATL::IDispatchImpl; | 107 using OLD_ATL::IDispatchImpl; |
112 using OLD_ATL::IObjectWithSiteImpl; | 108 using OLD_ATL::IObjectWithSiteImpl; |
113 using OLD_ATL::OLE2T; | 109 using OLD_ATL::OLE2T; |
114 | 110 |
115 #endif | 111 #endif |
116 | 112 |
117 /* | 113 /* |
118 * Deprecation pragmas use the compiler to identify refactoring targets. | 114 * Deprecation pragmas use the compiler to identify refactoring targets. |
119 */ | 115 */ |
120 #if DISABLE_ATL_FORWARDING | 116 #if DISABLE_ATL_FORWARDING |
121 namespace ATL { | 117 namespace ATL { |
122 #else | 118 #else |
123 namespace OLD_ATL { | 119 namespace OLD_ATL { |
124 #endif | 120 #endif |
125 #pragma deprecated( CString ) | 121 #pragma deprecated( CString ) |
126 #pragma deprecated( CComBSTR ) | 122 #pragma deprecated( CComBSTR ) |
127 #pragma deprecated( CComVariant ) | 123 #pragma deprecated( CComVariant ) |
| 124 #pragma deprecated( CRect ) |
128 #pragma deprecated( CW2A ) | 125 #pragma deprecated( CW2A ) |
129 } | 126 } |
130 | 127 |
131 /* | 128 /* |
132 * Note: | 129 * Note: |
133 * The preprocessor symbols ATLASSERT and ATLTRACE appear in the source. | 130 * The preprocessor symbols ATLASSERT and ATLTRACE appear in the source. |
134 * These resolve to nothing in Release configurations. | 131 * These resolve to nothing in Release configurations. |
135 * In Debug configurations, these are non-trivial. | 132 * In Debug configurations, these are non-trivial. |
136 * ATLASSERT resolves to an expression with _CrtDbgReportW and _CrtDbgBreak. | 133 * ATLASSERT resolves to an expression with _CrtDbgReportW and _CrtDbgBreak. |
137 * ATLTRACE resolves to a ATL::CTraceFileAndLineInfo. | 134 * ATLTRACE resolves to a ATL::CTraceFileAndLineInfo. |
138 * These will need to be replaced or removed. | 135 * These will need to be replaced or removed. |
139 */ | 136 */ |
OLD | NEW |