From 14b75f9878d5da0f5f2c9e2bb7dbbd2679a48ce6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 20 Jul 2002 20:30:57 +0000 Subject: [PATCH] Added definition of msvcrt internal error codes. --- dlls/msvcrt/msvcrt.h | 34 ++++++++++++++++++++++++++++++++++ dlls/msvcrt/thread.c | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 60dadb0c047..65e68f0968a 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -70,4 +70,38 @@ extern void msvcrt_init_args(void); extern void msvcrt_free_args(void); extern void msvcrt_init_vtables(void); +/* run-time error codes */ +#define _RT_STACK 0 +#define _RT_NULLPTR 1 +#define _RT_FLOAT 2 +#define _RT_INTDIV 3 +#define _RT_EXECMEM 5 +#define _RT_EXECFORM 6 +#define _RT_EXECENV 7 +#define _RT_SPACEARG 8 +#define _RT_SPACEENV 9 +#define _RT_ABORT 10 +#define _RT_NPTR 12 +#define _RT_FPTR 13 +#define _RT_BREAK 14 +#define _RT_INT 15 +#define _RT_THREAD 16 +#define _RT_LOCK 17 +#define _RT_HEAP 18 +#define _RT_OPENCON 19 +#define _RT_QWIN 20 +#define _RT_NOMAIN 21 +#define _RT_NONCONT 22 +#define _RT_INVALDISP 23 +#define _RT_ONEXIT 24 +#define _RT_PUREVIRT 25 +#define _RT_STDIOINIT 26 +#define _RT_LOWIOINIT 27 +#define _RT_HEAPINIT 28 +#define _RT_DOMAIN 120 +#define _RT_SING 121 +#define _RT_TLOSS 122 +#define _RT_CRNL 252 +#define _RT_BANNER 255 + #endif /* __WINE_MSVCRT_H */ diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c index 6a7f81fa081..f6203187ac0 100644 --- a/dlls/msvcrt/thread.c +++ b/dlls/msvcrt/thread.c @@ -46,8 +46,8 @@ MSVCRT_thread_data *msvcrt_get_thread_data(void) if (!(ptr = TlsGetValue( MSVCRT_tls_index ))) { if (!(ptr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptr) ))) - MSVCRT__amsg_exit(16); - if (!TlsSetValue( MSVCRT_tls_index, ptr )) MSVCRT__amsg_exit(16); + MSVCRT__amsg_exit( _RT_THREAD ); + if (!TlsSetValue( MSVCRT_tls_index, ptr )) MSVCRT__amsg_exit( _RT_THREAD ); } SetLastError( err ); return ptr;