ReactOS 0.4.15-dev-8231-g29a56f3
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 22 of file _invalid_parameter.c.

24{
26 else
27 {
28 ERR( "%s:%u %s: %s %lx\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg );
29#if _MSVCR_VER > 0 // FIXME: possible improvement: use a global variable in the DLL
31#endif
32 }
33}
static _invalid_parameter_handler invalid_parameter_handler
#define ERR(fmt,...)
Definition: debug.h:113
#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
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