[ATL][ATL_APITEST] Add test + implementation for CAtlFileMapping
[reactos.git] / sdk / lib / atl / atldef.h
1 /*
2 * PROJECT: ReactOS ATL
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: ATL Base definitions
5 * COPYRIGHT: Copyright 2019 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8 #pragma once
9
10
11 #define _ATL_PACKING 8
12
13
14 #ifndef AtlThrow
15 #ifndef _ATL_CUSTOM_THROW
16 #define AtlThrow(x) ATL::AtlThrowImp(x)
17 #endif
18 #endif
19
20
21 #ifndef ATLASSERT
22 #define ATLASSERT(expr) _ASSERTE(expr)
23 #endif
24
25
26 // ATLASSUME, ATLENSURE, ATLVERIFY, ...
27
28
29
30
31
32 #ifdef _ATL_DISABLE_NO_VTABLE
33 #define ATL_NO_VTABLE
34 #else
35 #define ATL_NO_VTABLE __declspec(novtable)
36 #endif
37
38 #ifndef ATL_DEPRECATED
39 #define ATL_DEPRECATED __declspec(deprecated)
40 #endif
41
42 // ATL_NOTHROW, ATL_FORCEINLINE, ATL_NOINLINE
43
44 // _ATL, ATL_VER, ATL_FILENAME_VER, ATL_FILENAME_VERNUM, ...
45
46
47
48 #define offsetofclass(base, derived) (reinterpret_cast<DWORD_PTR>(static_cast<base *>(reinterpret_cast<derived *>(_ATL_PACKING))) - _ATL_PACKING)
49
50
51
52 #ifndef _ATL_FREE_THREADED
53 #ifndef _ATL_APARTMENT_THREADED
54 #ifndef _ATL_SINGLE_THREADED
55 #define _ATL_FREE_THREADED
56 #endif
57 #endif
58 #endif
59