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$XIAA", long, read)
35#pragma section(".CRT$XIZ", long, read)
36#pragma section(".CRT$XCA", long, read)
37#pragma section(".CRT$XCZ", long, read)
38#pragma section(".CRT$XPA", long, read)
39#pragma section(".CRT$XPZ", long, read)
40#pragma section(".CRT$XTA", long, read)
41#pragma section(".CRT$XTZ", long, read)
44#pragma section(".CRT$XDA",long,read)
45#pragma section(".CRT$XDC",long,read)
46#pragma section(".CRT$XDZ",long,read)
48#pragma section(".CRT$XLA",long,read)
49#pragma section(".CRT$XLC",long,read)
50#pragma section(".CRT$XLD",long,read)
51#pragma section(".CRT$XLZ",long,read)
53#pragma section(".tls",long,read,write)
54#pragma section(".tls$AAA",long,read,write)
55#pragma section(".tls$ZZZ",long,read,write)
71#define CRT_WARNING_DISABLE_PUSH(wn, message) \
72 __pragma(warning(push)) \
73 __pragma(warning(disable: wn))
75#define CRT_WARNING_POP \
76 __pragma(warning(pop))
78#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE \
79 __pragma(warning(push)) \
80 __pragma(warning(disable: 4996))
82#define _END_SECURE_CRT_DEPRECATION_DISABLE \
83 __pragma(warning(pop))
85#define _CRT_DEBUGGER_IGNORE -1
86#define _CRT_DEBUGGER_GSFAILURE 1
87#define _CRT_DEBUGGER_INVALIDPARAMETER 2
88#define _CRT_DEBUGGER_ABORT 3
90#define _CRT_DEBUGGER_HOOK(x)
92#define _CRT_SECURITYCRITICAL_ATTRIBUTE
93#define _CRT_SECURITYSAFECRITICAL_ATTRIBUTE
103 #define _INVALID_PARAMETER(expr) _invalid_parameter(expr, __FUNCTIONW__, __FILEW__, __LINE__, 0)
105 #define _INVALID_PARAMETER(expr) _invalid_parameter_noinfo()
108#define _VALIDATE_RETURN(expr, errorcode, retexpr) \
110 int _Expr_val = !!(expr); \
111 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
114 *_errno() = (errorcode); \
115 _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
120#define _VALIDATE_RETURN_VOID(expr, errorcode) \
122 int _Expr_val = !!(expr); \
123 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
126 *_errno() = (errorcode); \
127 _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
132#define _VALIDATE_RETURN_NOERRNO(expr, retexpr) \
134 int _Expr_val = !!(expr); \
135 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
138 _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
143#define _VALIDATE_RETURN_ERRCODE(expr, errorcode) \
144 _VALIDATE_RETURN(expr, errorcode, errorcode)
146#define _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, retexpr) \
148 int _Expr_val = !!(expr); \
149 _ASSERT_EXPR((_Expr_val), _CRT_WIDE(#expr)); \
152 *__doserrno() = 0L; \
153 *_errno() = errorcode; \
154 _INVALID_PARAMETER(_CRT_WIDE(#expr) ); \
159#define _VALIDATE_CLEAR_OSSERR_RETURN_ERRCODE(expr, errorcode) \
160 _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, errorcode)
162#define _VALIDATE_RETURN_NOEXC(expr, errorcode, retexpr) \
166 *_errno() = errorcode; \
171#define _VALIDATE_RETURN_ERRCODE_NOEXC(expr, errorcode) \
172 _VALIDATE_RETURN_NOEXC(expr, errorcode, errorcode)
174#define _malloc_crt malloc
175#define _free_crt free
176#define _calloc_crt calloc
177#define _recalloc_crt _recalloc
178#define _malloca_crt _malloca
179#define _freea_crt _freea
186T __crt_fast_encode_pointer(
T ptr)
195T __crt_fast_decode_pointer(
T ptr)
203T __crt_interlocked_read(
const T volatile*
ptr)
209T __crt_interlocked_read_pointer(
const T volatile*
ptr)
215T __crt_interlocked_exchange_pointer(
T *
ptr,
void*
value)
221struct __crt_seh_guarded_call
223 template<
typename Init,
typename Action,
typename Cleanup>
242struct __crt_seh_guarded_call<
void>
244 template<
typename Init,
typename Action,
typename Cleanup>
260template<
typename FuncPtr>
266template<
typename Action,
typename Cleanup>
273struct __crt_malloc_free_policy
276 void operator()(
T*
const ptr)
throw()
282struct __crt_public_free_policy
285 void operator()(
T*
const ptr)
throw()
291struct __crt_malloca_free_policy
293 void operator()(
void*
const ptr)
throw()
299template <
typename T,
typename FreePolicy = __crt_malloc_free_policy>
300class __crt_unique_heap_ptr
304 __crt_unique_heap_ptr() : _ptr(
nullptr) {}
305 __crt_unique_heap_ptr(
T*
ptr) : _ptr(
ptr) {}
306 __crt_unique_heap_ptr(__crt_unique_heap_ptr&&
from) : _ptr(
from._ptr) {
from._ptr =
nullptr; }
307 ~__crt_unique_heap_ptr() { FreePolicy()(_ptr); }
308 void attach(
T*
ptr) { FreePolicy()(_ptr); _ptr =
ptr; }
309 T* detach() {
T*
ptr = _ptr; _ptr =
nullptr;
return ptr; }
310 operator bool()
const {
return _ptr !=
nullptr; }
311 T*
get()
const {
return _ptr; }
312 T** get_address_of() {
return &_ptr; }
315 __crt_unique_heap_ptr& operator=(__crt_unique_heap_ptr&&
from)
325using __crt_scoped_stack_ptr = __crt_unique_heap_ptr<T, __crt_malloca_free_policy>;
327#define _malloc_crt_t(t, n) (__crt_unique_heap_ptr<t>(static_cast<t*>(_malloc_crt((n) * sizeof(t)))))
328#define _calloc_crt_t(t, n) (__crt_unique_heap_ptr<t>(static_cast<t*>(_calloc_crt((n), sizeof(t)))))
329#define _recalloc_crt_t(t, p, n) (__crt_unique_heap_ptr<t>(static_cast<t*>(_recalloc_crt(p, (n), sizeof(t)))))
330#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