2 * Copyright 2019 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #ifndef _ATL_USE_WINAPI_FAMILY_DESKTOP_APP
25 #define _ATL_USE_WINAPI_FAMILY_DESKTOP_APP
28 #ifndef ATLPREFAST_SUPPRESS
29 #define ATLPREFAST_SUPPRESS(x)
32 #ifndef ATLPREFAST_UNSUPPRESS
33 #define ATLPREFAST_UNSUPPRESS(x)
45 #define ATLENSURE(expr)
50 #define _ATL_DECLSPEC_ALLOCATOR
52 #ifndef _FormatMessage_format_string_
53 #define _FormatMessage_format_string_
56 #define ATLAPI HRESULT __stdcall
57 #define ATLAPI_(x) x __stdcall
58 #define ATLINLINE inline
60 /* Belongs elsewhere */
63 #define ATL_MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
64 #define ATL_MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
66 # ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
67 # define ATL_MAKEINTRESOURCE(i) ((ULONG_PTR)((WORD)(i)))
69 # define ATL_MAKEINTRESOURCE WINELIB_NAME_AW(ATL_MAKEINTRESOURCE)
73 #define ATL_IS_INTRESOURCE(x) (((ULONG_PTR)(x) >> 16) == 0)
75 #define ATL_RT_CURSOR ATL_MAKEINTRESOURCEA(1)
76 #define ATL_RT_BITMAP ATL_MAKEINTRESOURCEA(2)
77 #define ATL_RT_ICON ATL_MAKEINTRESOURCEA(3)
78 #define ATL_RT_MENU ATL_MAKEINTRESOURCEA(4)
79 #define ATL_RT_DIALOG ATL_MAKEINTRESOURCEA(5)
80 #define ATL_RT_STRING ATL_MAKEINTRESOURCEA(6)
81 #define ATL_RT_FONTDIR ATL_MAKEINTRESOURCEA(7)
82 #define ATL_RT_FONT ATL_MAKEINTRESOURCEA(8)
83 #define ATL_RT_ACCELERATOR ATL_MAKEINTRESOURCEA(9)
84 #define ATL_RT_RCDATA ATL_MAKEINTRESOURCEA(10)
85 #define ATL_RT_MESSAGETABLE ATL_MAKEINTRESOURCEA(11)
87 #define ATL_DIFFERENCE 11
88 #define ATL_RT_GROUP_CURSOR ATL_MAKEINTRESOURCEW((ULONG_PTR)ATL_RT_CURSOR + ATL_DIFFERENCE)
89 #define ATL_RT_GROUP_ICON ATL_MAKEINTRESOURCEW((ULONG_PTR)ATL_RT_ICON + ATL_DIFFERENCE)
90 #define ATL_RT_VERSION ATL_MAKEINTRESOURCEA(16)
91 #define ATL_RT_DLGINCLUDE ATL_MAKEINTRESOURCEA(17)
92 #define ATL_RT_PLUGPLAY ATL_MAKEINTRESOURCEA(19)
93 #define ATL_RT_VXD ATL_MAKEINTRESOURCEA(20)
94 #define ATL_RT_ANICURSOR ATL_MAKEINTRESOURCEA(21)
95 #define ATL_RT_ANIICON ATL_MAKEINTRESOURCEA(22)
96 #define ATL_RT_HTML ATL_MAKEINTRESOURCEA(23)
99 #ifndef _ATL_CUSTOM_THROW
100 #define AtlThrow ATL::AtlThrowImpl
106 template < typename T
>
107 inline T
* SAL_Assume_bytecap_for_opt_(T
* buf
, size_t dwLen
)
114 template <typename T
>
115 inline T
* SAL_Assume_notnull_for_opt_z_(T
* buf
)
121 #ifndef _ATL_CUSTOM_THROW
122 ATL_NOINLINE DECLSPEC_NORETURN
inline void WINAPI
AtlThrowImpl(_In_ HRESULT hr
);
124 ATL_NOINLINE DECLSPEC_NORETURN
inline void WINAPI
AtlThrowLastWin32();
129 #endif /* __ATLDEF_H__ */