23#define _CRTALLOC(x) __declspec(allocate(x))
25#define _CRTALLOC(x) __attribute__((section(x)))
29#pragma section(".CRT$XIC", long, read)
30#pragma section(".CRT$XPX", long, read)
31#pragma section(".CRT$XPXA", long, read)
33#pragma section(".CRT$XIA", long, read)
34#pragma section(".CRT$XIZ", long, read)
35#pragma section(".CRT$XCA", long, read)
36#pragma section(".CRT$XCZ", long, read)
37#pragma section(".CRT$XPA", long, read)
38#pragma section(".CRT$XPZ", long, read)
39#pragma section(".CRT$XTA", long, read)
40#pragma section(".CRT$XTZ", long, read)
43#pragma section(".CRT$XDA",long,read)
44#pragma section(".CRT$XDC",long,read)
45#pragma section(".CRT$XDZ",long,read)
47#pragma section(".CRT$XLA",long,read)
48#pragma section(".CRT$XLC",long,read)
49#pragma section(".CRT$XLD",long,read)
50#pragma section(".CRT$XLZ",long,read)
52#pragma section(".tls",long,read,write)
53#pragma section(".tls$AAA",long,read,write)
54#pragma section(".tls$ZZZ",long,read,write)
70#define CRT_WARNING_DISABLE_PUSH(wn, message) \
71 __pragma(warning(push)) \
72 __pragma(warning(disable: wn))
74#define CRT_WARNING_POP \
75 __pragma(warning(pop))
77#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE \
78 __pragma(warning(push)) \
79 __pragma(warning(disable: 4996))
81#define _END_SECURE_CRT_DEPRECATION_DISABLE \
82 __pragma(warning(pop))
84#define _CRT_DEBUGGER_IGNORE -1
85#define _CRT_DEBUGGER_GSFAILURE 1
86#define _CRT_DEBUGGER_INVALIDPARAMETER 2
87#define _CRT_DEBUGGER_ABORT 3
89#define _CRT_DEBUGGER_HOOK(x)
91#define _CRT_SECURITYCRITICAL_ATTRIBUTE
92#define _CRT_SECURITYSAFECRITICAL_ATTRIBUTE
102 #define _INVALID_PARAMETER(expr) _invalid_parameter(expr, __FUNCTIONW__, __FILEW__, __LINE__, 0)
104 #define _INVALID_PARAMETER(expr) _invalid_parameter_noinfo()
107#define _VALIDATE_RETURN(expr, errorcode, retexpr) \
109 int _Expr_val = !!(expr); \
110 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
113 *_errno() = (errorcode); \
114 _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
119#define _VALIDATE_RETURN_VOID(expr, errorcode) \
121 int _Expr_val = !!(expr); \
122 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
125 *_errno() = (errorcode); \
126 _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
131#define _VALIDATE_RETURN_NOERRNO(expr, retexpr) \
133 int _Expr_val = !!(expr); \
134 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
137 _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
142#define _VALIDATE_RETURN_ERRCODE(expr, errorcode) \
143 _VALIDATE_RETURN(expr, errorcode, errorcode)
145#define _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, retexpr) \
147 int _Expr_val = !!(expr); \
148 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
151 *__doserrno() = 0L; \
152 *_errno() = errorcode; \
153 _INVALID_PARAMETER(_CRT_WIDE(#expr) ); \
158#define _VALIDATE_CLEAR_OSSERR_RETURN_ERRCODE(expr, errorcode) \
159 _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, errorcode)
161#define _VALIDATE_RETURN_NOEXC(expr, errorcode, retexpr) \
165 *_errno() = errorcode; \
170#define _VALIDATE_RETURN_ERRCODE_NOEXC(expr, errorcode) \
171 _VALIDATE_RETURN_NOEXC(expr, errorcode, errorcode)
173#define _malloc_crt malloc
174#define _free_crt free
175#define _calloc_crt calloc
176#define _recalloc_crt _recalloc
177#define _malloca_crt _malloca
178#define _freea_crt _freea
185T __crt_fast_encode_pointer(
T ptr)
194T __crt_fast_decode_pointer(
T ptr)
202T __crt_interlocked_read(
const T volatile*
ptr)
208T __crt_interlocked_read_pointer(
const T volatile*
ptr)
214T __crt_interlocked_exchange_pointer(
T *
ptr,
void*
value)
220struct __crt_seh_guarded_call
222 template<
typename Init,
typename Action,
typename Cleanup>
241struct __crt_seh_guarded_call<
void>
243 template<
typename Init,
typename Action,
typename Cleanup>
259template<
typename FuncPtr>
265template<
typename Action,
typename Cleanup>
272struct __crt_malloc_free_policy
275 void operator()(
T*
const ptr)
throw()
281struct __crt_public_free_policy
284 void operator()(
T*
const ptr)
throw()
290struct __crt_malloca_free_policy
292 void operator()(
void*
const ptr)
throw()
298template <
typename T,
typename FreePolicy = __crt_malloc_free_policy>
299class __crt_unique_heap_ptr
303 __crt_unique_heap_ptr() : _ptr(
nullptr) {}
304 __crt_unique_heap_ptr(
T*
ptr) : _ptr(
ptr) {}
305 __crt_unique_heap_ptr(__crt_unique_heap_ptr&&
from) : _ptr(
from._ptr) {
from._ptr =
nullptr; }
306 ~__crt_unique_heap_ptr() { FreePolicy()(_ptr); }
307 void attach(
T*
ptr) { FreePolicy()(_ptr); _ptr =
ptr; }
308 T* detach() {
T*
ptr = _ptr; _ptr =
nullptr;
return ptr; }
309 operator bool()
const {
return _ptr !=
nullptr; }
310 T*
get()
const {
return _ptr; }
311 T** get_address_of() {
return &_ptr; }
314 __crt_unique_heap_ptr& operator=(__crt_unique_heap_ptr&&
from)
324using __crt_scoped_stack_ptr = __crt_unique_heap_ptr<T, __crt_malloca_free_policy>;
326#define _malloc_crt_t(t, n) (__crt_unique_heap_ptr<t>(static_cast<t*>(_malloc_crt((n) * sizeof(t)))))
327#define _calloc_crt_t(t, n) (__crt_unique_heap_ptr<t>(static_cast<t*>(_calloc_crt((n), sizeof(t)))))
328#define _recalloc_crt_t(t, p, n) (__crt_unique_heap_ptr<t>(static_cast<t*>(_recalloc_crt(p, (n), sizeof(t)))))
329#define _malloca_crt_t(t, n) (__crt_scoped_stack_ptr<t>(static_cast<t*>(_malloca_crt((n) * sizeof(t)))))
void get(int argc, const char *argv[])
int(__cdecl * _PIFV)(void)
void(__cdecl * _PVFV)(void)
#define GetProcAddress(x, y)
static void cleanup(void)
static const WCHAR Cleanup[]
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
const IMAGE_TLS_DIRECTORY _tls_used
void * _InterlockedExchangePointer(_Interlocked_operand_ void *volatile *_Target, void *_Value)
uintptr_t __security_cookie
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action