ReactOS 0.4.15-dev-7918-g2a2556c
safecrt.h File Reference
#include <errno.h>
Include dependency graph for safecrt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MSVCRT_INVALID_PMT(x, err)   (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))
 
#define MSVCRT_CHECK_PMT_ERR(x, err)   ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), 0))
 
#define MSVCRT_CHECK_PMT(x)   MSVCRT_CHECK_PMT_ERR((x), EINVAL)
 

Functions

void _invalid_parameter (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t pReserved)
 

Variables

void__pInvalidArgHandler
 

Macro Definition Documentation

◆ MSVCRT_CHECK_PMT

#define MSVCRT_CHECK_PMT (   x)    MSVCRT_CHECK_PMT_ERR((x), EINVAL)

Definition at line 16 of file safecrt.h.

◆ MSVCRT_CHECK_PMT_ERR

#define MSVCRT_CHECK_PMT_ERR (   x,
  err 
)    ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), 0))

Definition at line 15 of file safecrt.h.

◆ MSVCRT_INVALID_PMT

#define MSVCRT_INVALID_PMT (   x,
  err 
)    (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))

Definition at line 14 of file safecrt.h.

Function Documentation

◆ _invalid_parameter()

void _invalid_parameter ( const wchar_t expression,
const wchar_t function,
const wchar_t file,
unsigned int  line,
uintptr_t  pReserved 
)

Definition at line 137 of file errno.c.

139{
141 else
142 {
143 ERR( "%s:%u %s: %s %lx\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg );
144#if _MSVCR_VER > 0 // FIXME: possible improvement: use a global variable in the DLL
146#endif
147 }
148}
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
GLenum func
Definition: glext.h:6028
#define debugstr_w
Definition: kernel32.h:32
#define STATUS_INVALID_CRUNTIME_PARAMETER
Definition: ntstatus.h:959
static _invalid_parameter_handler invalid_parameter_handler
Definition: errno.c:14
Definition: query.h:87
Definition: fci.c:127
Definition: parser.c:49
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23

Referenced by _fsopen(), _tasctime_s(), localtime_s(), and rand_s().

Variable Documentation

◆ __pInvalidArgHandler

void* __pInvalidArgHandler
extern