ReactOS 0.4.15-dev-8222-g9164419
atldef.h
Go to the documentation of this file.
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#ifndef __REACTOS__
11 #include <cstddef>
12 #include <pseh/pseh2.h>
13#endif
14
15#define _ATL_PACKING 8
16
17
18#ifndef AtlThrow
19#ifndef _ATL_CUSTOM_THROW
20#define AtlThrow(x) ATL::AtlThrowImp(x)
21#endif
22#endif
23
24
25#ifndef ATLASSERT
26#define ATLASSERT(expr) _ASSERTE(expr)
27#endif
28
29
30// ATLASSUME, ATLENSURE, ATLVERIFY, ...
31
32
33
34
35
36#ifdef _ATL_DISABLE_NO_VTABLE
37#define ATL_NO_VTABLE
38#else
39#define ATL_NO_VTABLE __declspec(novtable)
40#endif
41
42#ifndef ATL_DEPRECATED
43#define ATL_DEPRECATED __declspec(deprecated)
44#endif
45
46// ATL_NOTHROW, ATL_FORCEINLINE, ATL_NOINLINE
47
48// _ATL, ATL_VER, ATL_FILENAME_VER, ATL_FILENAME_VERNUM, ...
49
50
51
52#define offsetofclass(base, derived) (reinterpret_cast<DWORD_PTR>(static_cast<base *>(reinterpret_cast<derived *>(_ATL_PACKING))) - _ATL_PACKING)
53
54
55
56#ifndef _ATL_FREE_THREADED
57#ifndef _ATL_APARTMENT_THREADED
58#ifndef _ATL_SINGLE_THREADED
59#define _ATL_FREE_THREADED
60#endif
61#endif
62#endif
63