Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
dbghelp.h
Go to the documentation of this file.
1/* Copyright (C) 2025 Wildfire Games.
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining
4 * a copy of this software and associated documentation files (the
5 * "Software"), to deal in the Software without restriction, including
6 * without limitation the rights to use, copy, modify, merge, publish,
7 * distribute, sublicense, and/or sell copies of the Software, and to
8 * permit persons to whom the Software is furnished to do so, subject to
9 * the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22
23/*
24 * bring in dbghelp library.
25 */
26
27#ifndef INCLUDED_DBGHELP
28#define INCLUDED_DBGHELP
29
31
32#include <OAIdl.h> // VARIANT
33
34//-----------------------------------------------------------------------------
35// fix omissions in the VC PSDK's dbghelp.h
36
37// the macros defined "for those without specstrings.h" are incorrect -
38// parameter definition is missing.
39#ifndef __specstrings
40# define __specstrings // prevent dbghelp from changing these
41
42# define __in
43# define __out
44# define __inout
45# define __in_opt
46# define __out_opt
47# define __inout_opt
48# define __in_ecount(s)
49# define __out_ecount(s)
50# define __inout_ecount(s)
51# define __in_bcount(s)
52# define __out_bcount(s)
53# define __inout_bcount(s)
54# define __deref_opt_out
55# define __deref_out
56
57#endif
58
59// (VC2005 defines __specstrings, but doesn't define (or use) __out_xcount,
60// so this is not inside the above #ifndef section)
61//
62// missing from dbghelp's list
63#ifndef __out_xcount
64# define __out_xcount(s)
65#endif
66
67
68//
69// not defined by dbghelp; these values are taken from DIA cvconst.h
70//
71
73{
75 btVoid = 1,
76 btChar = 2,
78 btInt = 6,
79 btUInt = 7,
81 btBCD = 9,
82 btBool = 10,
83 btLong = 13,
84 btULong = 14,
86 btDate = 26,
89 btBit = 29,
90 btBSTR = 30,
91 btHresult = 31
92};
93
95{
107
108
109//-----------------------------------------------------------------------------
110
111#pragma pack(push, 8) // seems to be required
112
113#define _NO_CVCONST_H // request SymTagEnum be defined
114#include <dbghelp.h> // must come after win.h and the above definitions
115
116#pragma pack(pop)
117
118//-----------------------------------------------------------------------------
119
120// rationale: Debugging Tools For Windows includes newer header/lib files,
121// but they're not redistributable. since we don't want everyone to
122// have to install that, it's preferable to link dynamically.
123
124// declare function pointers
125#define FUNC(ret, name, params) EXTERN_C ret (__stdcall *p##name) params;
127#undef FUNC
128
130
131#endif // #ifndef INCLUDED_DBGHELP
void dbghelp_ImportFunctions()
DataKind
Definition: dbghelp.h:95
@ DataIsUnknown
Definition: dbghelp.h:96
@ DataIsLocal
Definition: dbghelp.h:97
@ DataIsStaticMember
Definition: dbghelp.h:104
@ DataIsGlobal
Definition: dbghelp.h:102
@ DataIsStaticLocal
Definition: dbghelp.h:98
@ DataIsMember
Definition: dbghelp.h:103
@ DataIsObjectPtr
Definition: dbghelp.h:100
@ DataIsConstant
Definition: dbghelp.h:105
@ DataIsFileStatic
Definition: dbghelp.h:101
@ DataIsParam
Definition: dbghelp.h:99
BasicType
Definition: dbghelp.h:73
@ btVoid
Definition: dbghelp.h:75
@ btVariant
Definition: dbghelp.h:87
@ btBCD
Definition: dbghelp.h:81
@ btBSTR
Definition: dbghelp.h:90
@ btUInt
Definition: dbghelp.h:79
@ btULong
Definition: dbghelp.h:84
@ btLong
Definition: dbghelp.h:83
@ btChar
Definition: dbghelp.h:76
@ btBit
Definition: dbghelp.h:89
@ btNoType
Definition: dbghelp.h:74
@ btDate
Definition: dbghelp.h:86
@ btComplex
Definition: dbghelp.h:88
@ btBool
Definition: dbghelp.h:82
@ btInt
Definition: dbghelp.h:78
@ btCurrency
Definition: dbghelp.h:85
@ btHresult
Definition: dbghelp.h:91
@ btWChar
Definition: dbghelp.h:77
@ btFloat
Definition: dbghelp.h:80