ReactOS 0.4.16-dev-2104-gb84fa49
errno.c
Go to the documentation of this file.
1/*
2 * msvcrt.dll errno functions
3 *
4 * Copyright 2000 Jon Griffiths
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <io.h>
22#include <stdio.h>
23#include <string.h>
24#include <stdarg.h>
25
26#include "ntstatus.h"
27#define WIN32_NO_STATUS
28#include "windef.h"
29#include "winternl.h"
30#include "msvcrt.h"
31#include "winnls.h"
32#include "excpt.h"
33#include "wine/debug.h"
34
36
37/* error strings generated with glibc strerror */
38static char str_success[] = "Success";
39static char str_EPERM[] = "Operation not permitted";
40static char str_ENOENT[] = "No such file or directory";
41static char str_ESRCH[] = "No such process";
42static char str_EINTR[] = "Interrupted system call";
43static char str_EIO[] = "Input/output error";
44static char str_ENXIO[] = "No such device or address";
45static char str_E2BIG[] = "Argument list too long";
46static char str_ENOEXEC[] = "Exec format error";
47static char str_EBADF[] = "Bad file descriptor";
48static char str_ECHILD[] = "No child processes";
49static char str_EAGAIN[] = "Resource temporarily unavailable";
50static char str_ENOMEM[] = "Cannot allocate memory";
51static char str_EACCES[] = "Permission denied";
52static char str_EFAULT[] = "Bad address";
53static char str_EBUSY[] = "Device or resource busy";
54static char str_EEXIST[] = "File exists";
55static char str_EXDEV[] = "Invalid cross-device link";
56static char str_ENODEV[] = "No such device";
57static char str_ENOTDIR[] = "Not a directory";
58static char str_EISDIR[] = "Is a directory";
59static char str_EINVAL[] = "Invalid argument";
60static char str_ENFILE[] = "Too many open files in system";
61static char str_EMFILE[] = "Too many open files";
62static char str_ENOTTY[] = "Inappropriate ioctl for device";
63static char str_EFBIG[] = "File too large";
64static char str_ENOSPC[] = "No space left on device";
65static char str_ESPIPE[] = "Illegal seek";
66static char str_EROFS[] = "Read-only file system";
67static char str_EMLINK[] = "Too many links";
68static char str_EPIPE[] = "Broken pipe";
69static char str_EDOM[] = "Numerical argument out of domain";
70static char str_ERANGE[] = "Numerical result out of range";
71static char str_EDEADLK[] = "Resource deadlock avoided";
72static char str_ENAMETOOLONG[] = "File name too long";
73static char str_ENOLCK[] = "No locks available";
74static char str_ENOSYS[] = "Function not implemented";
75static char str_ENOTEMPTY[] = "Directory not empty";
76static char str_EILSEQ[] = "Invalid or incomplete multibyte or wide character";
77static char str_generic_error[] = "Unknown error";
78
80{
86 str_EIO,
108 str_EFBIG,
111 str_EROFS,
113 str_EPIPE,
114 str_EDOM,
125};
126
128
130
131/* INTERNAL: Set the crt and dos errno's from the OS error given. */
133{
134 int *errno_ptr = _errno();
135 __msvcrt_ulong *doserrno = __doserrno();
136
137 *doserrno = err;
138
139 switch(err)
140 {
141#define ERR_CASE(oserr) case oserr:
142#define ERR_MAPS(oserr, crterr) case oserr: *errno_ptr = crterr; break
185 default:
186 /* Remaining cases map to EINVAL */
187 /* FIXME: may be missing some errors above */
188 *errno_ptr = EINVAL;
189 }
190}
191
192#if _MSVCR_VER >= 80
193
194/*********************************************************************
195 * __sys_nerr (MSVCR80.@)
196 */
197int* CDECL __sys_nerr(void)
198{
199 return (int*)&MSVCRT__sys_nerr;
200}
201
202/*********************************************************************
203 * __sys_errlist (MSVCR80.@)
204 */
205char** CDECL __sys_errlist(void)
206{
207 return MSVCRT__sys_errlist;
208}
209
210#endif /* _MSVCR_VER >= 80 */
211
212/*********************************************************************
213 * _errno (MSVCRT.@)
214 */
215int* CDECL _errno(void)
216{
217 return &msvcrt_get_thread_data()->thread_errno;
218}
219
220/*********************************************************************
221 * __doserrno (MSVCRT.@)
222 */
224{
225 return &msvcrt_get_thread_data()->thread_doserrno;
226}
227
228/*********************************************************************
229 * _get_errno (MSVCRT.@)
230 */
232{
233 if (!pValue)
234 return EINVAL;
235
236 *pValue = *_errno();
237 return 0;
238}
239
240/*********************************************************************
241 * _get_doserrno (MSVCRT.@)
242 */
244{
245 if (!pValue)
246 return EINVAL;
247
248 *pValue = *__doserrno();
249 return 0;
250}
251
252/*********************************************************************
253 * _set_errno (MSVCRT.@)
254 */
256{
257 *_errno() = value;
258 return 0;
259}
260
261/*********************************************************************
262 * _set_doserrno (MSVCRT.@)
263 */
265{
266 *__doserrno() = value;
267 return 0;
268}
269
270/*********************************************************************
271 * strerror (MSVCRT.@)
272 */
274{
276
277 if (!data->strerror_buffer)
278 if (!(data->strerror_buffer = malloc(256))) return NULL;
279
280 if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
281 strcpy( data->strerror_buffer, MSVCRT__sys_errlist[err] );
282 return data->strerror_buffer;
283}
284
285/**********************************************************************
286 * strerror_s (MSVCRT.@)
287 */
288int CDECL strerror_s(char *buffer, size_t numberOfElements, int errnum)
289{
290 char *ptr;
291
292 if (!buffer || !numberOfElements)
293 {
294 *_errno() = EINVAL;
295 return EINVAL;
296 }
297
298 if (errnum < 0 || errnum > MSVCRT__sys_nerr)
299 errnum = MSVCRT__sys_nerr;
300
301 ptr = MSVCRT__sys_errlist[errnum];
302 while (*ptr && numberOfElements > 1)
303 {
304 *buffer++ = *ptr++;
306 }
307
308 *buffer = '\0';
309 return 0;
310}
311
312/**********************************************************************
313 * _strerror (MSVCRT.@)
314 */
315char* CDECL _strerror(const char* str)
316{
318 int err;
319
320 if (!data->strerror_buffer)
321 if (!(data->strerror_buffer = malloc(256))) return NULL;
322
323 err = data->thread_errno;
324 if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
325
326 if (str && *str)
327 sprintf( data->strerror_buffer, "%s: %s\n", str, MSVCRT__sys_errlist[err] );
328 else
329 sprintf( data->strerror_buffer, "%s\n", MSVCRT__sys_errlist[err] );
330
331 return data->strerror_buffer;
332}
333
334/*********************************************************************
335 * perror (MSVCRT.@)
336 */
337void CDECL perror(const char* str)
338{
339 int err = *_errno();
340 if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
341
342 if (str && *str)
343 {
344 _write( 2, str, strlen(str) );
345 _write( 2, ": ", 2 );
346 }
348 _write( 2, "\n", 1 );
349}
350
351/*********************************************************************
352 * _wperror (MSVCRT.@)
353 */
354void CDECL _wperror(const wchar_t* str)
355{
356 size_t size;
357 char *buffer = NULL;
358
359 if (str && *str)
360 {
361 size = wcstombs(NULL, str, 0);
362 if (size == -1) return;
363 size++;
364 buffer = malloc(size);
365 if (!buffer) return;
366 if (wcstombs(buffer, str, size) == -1)
367 {
368 free(buffer);
369 return;
370 }
371 }
372 perror(buffer);
373 free(buffer);
374}
375
376/*********************************************************************
377 * _wcserror_s (MSVCRT.@)
378 */
379int CDECL _wcserror_s(wchar_t* buffer, size_t nc, int err)
380{
381 if (!MSVCRT_CHECK_PMT(buffer != NULL)) return EINVAL;
382 if (!MSVCRT_CHECK_PMT(nc > 0)) return EINVAL;
383
384 if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
386 return 0;
387}
388
389/*********************************************************************
390 * _wcserror (MSVCRT.@)
391 */
392wchar_t* CDECL _wcserror(int err)
393{
395
396 if (!data->wcserror_buffer)
397 if (!(data->wcserror_buffer = malloc(256 * sizeof(wchar_t)))) return NULL;
398 _wcserror_s(data->wcserror_buffer, 256, err);
399 return data->wcserror_buffer;
400}
401
402/**********************************************************************
403 * __wcserror_s (MSVCRT.@)
404 */
405int CDECL __wcserror_s(wchar_t* buffer, size_t nc, const wchar_t* str)
406{
407 int err;
408 size_t len;
409
410 err = *_errno();
411 if (err < 0 || err > MSVCRT__sys_nerr) err = MSVCRT__sys_nerr;
412
413 len = MultiByteToWideChar(CP_ACP, 0, MSVCRT__sys_errlist[err], -1, NULL, 0) + 1 /* \n */;
414 if (str && *str) len += wcslen(str) + 2 /* ': ' */;
415 if (len > nc)
416 {
417 MSVCRT_INVALID_PMT("buffer[nc] is too small", ERANGE);
418 return ERANGE;
419 }
420 if (str && *str)
421 {
423 lstrcatW(buffer, L": ");
424 }
425 else buffer[0] = '\0';
426 len = wcslen(buffer);
428 lstrcatW(buffer, L"\n");
429
430 return 0;
431}
432
433/**********************************************************************
434 * __wcserror (MSVCRT.@)
435 */
436wchar_t* CDECL __wcserror(const wchar_t* str)
437{
439 int err;
440
441 if (!data->wcserror_buffer)
442 if (!(data->wcserror_buffer = malloc(256 * sizeof(wchar_t)))) return NULL;
443
444 err = __wcserror_s(data->wcserror_buffer, 256, str);
445 if (err) FIXME("bad wcserror call (%d)\n", err);
446
447 return data->wcserror_buffer;
448}
449
450/******************************************************************************
451 * _seterrormode (MSVCRT.@)
452 */
454{
456}
457
458/******************************************************************************
459 * _invalid_parameter (MSVCRT.@)
460 */
461void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func,
462 const wchar_t *file, unsigned int line, uintptr_t arg)
463{
464#if _MSVCR_VER >= 140
466
467 if (data->invalid_parameter_handler)
468 {
469 data->invalid_parameter_handler( expr, func, file, line, arg );
470 return;
471 }
472#endif
473
475 else
476 {
477 ERR( "%s:%u %s: %s %Ix\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg );
478#if _MSVCR_VER >= 80
480#endif
481 }
482}
483
484#if _MSVCR_VER >= 80
485
486/*********************************************************************
487 * _invalid_parameter_noinfo (MSVCR80.@)
488 */
490{
491 _invalid_parameter( NULL, NULL, NULL, 0, 0 );
492}
493
494/*********************************************************************
495 * _invalid_parameter_noinfo_noreturn (MSVCR80.@)
496 */
497void CDECL _invalid_parameter_noinfo_noreturn(void)
498{
499 _invalid_parameter( NULL, NULL, NULL, 0, 0 );
501}
502
503/*********************************************************************
504 * _get_invalid_parameter_handler (MSVCR80.@)
505 */
507{
508 TRACE("\n");
510}
511
512/*********************************************************************
513 * _set_invalid_parameter_handler (MSVCR80.@)
514 */
517{
519
520 TRACE("(%p)\n", handler);
521
523 return old;
524}
525
526#endif /* _MSVCR_VER >= 80 */
527
528#if _MSVCR_VER >= 140
529
530/*********************************************************************
531 * _get_thread_local_invalid_parameter_handler (UCRTBASE.@)
532 */
534{
535 TRACE("\n");
536 return msvcrt_get_thread_data()->invalid_parameter_handler;
537}
538
539/*********************************************************************
540 * _set_thread_local_invalid_parameter_handler (UCRTBASE.@)
541 */
544{
546 _invalid_parameter_handler old = data->invalid_parameter_handler;
547
548 TRACE("(%p)\n", handler);
549
550 data->invalid_parameter_handler = handler;
551 return old;
552}
553
554#endif /* _MSVCR_VER >= 140 */
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
#define ERROR_BUSY
Definition: dderror.h:12
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
#define CP_ACP
Definition: compat.h:109
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define lstrcpyW
Definition: compat.h:749
#define MultiByteToWideChar
Definition: compat.h:110
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
UINT WINAPI SetErrorMode(IN UINT uMode)
Definition: except.c:751
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
void CDECL _seterrormode(int mode)
Definition: errno.c:453
static char str_ESRCH[]
Definition: errno.c:41
static char str_EXDEV[]
Definition: errno.c:55
static char str_EINTR[]
Definition: errno.c:42
char *CDECL strerror(int err)
Definition: errno.c:273
void CDECL _wperror(const wchar_t *str)
Definition: errno.c:354
static char str_EFAULT[]
Definition: errno.c:52
static char str_ENOENT[]
Definition: errno.c:40
static char str_EAGAIN[]
Definition: errno.c:49
static char str_EBUSY[]
Definition: errno.c:53
static char str_EMLINK[]
Definition: errno.c:67
static char str_ENOTDIR[]
Definition: errno.c:57
static char str_EILSEQ[]
Definition: errno.c:76
int CDECL _set_doserrno(int value)
Definition: errno.c:264
static char str_ENOTEMPTY[]
Definition: errno.c:75
wchar_t *CDECL _wcserror(int err)
Definition: errno.c:392
#define ERR_MAPS(oserr, crterr)
static char str_EMFILE[]
Definition: errno.c:61
static char str_ESPIPE[]
Definition: errno.c:65
void CDECL perror(const char *str)
Definition: errno.c:337
static char str_ENOLCK[]
Definition: errno.c:73
char * MSVCRT__sys_errlist[]
Definition: errno.c:79
static char str_EIO[]
Definition: errno.c:43
static char str_EACCES[]
Definition: errno.c:51
static char str_EEXIST[]
Definition: errno.c:54
static char str_ENOSPC[]
Definition: errno.c:64
wchar_t *CDECL __wcserror(const wchar_t *str)
Definition: errno.c:436
void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t arg)
Definition: errno.c:461
int CDECL strerror_s(char *buffer, size_t numberOfElements, int errnum)
Definition: errno.c:288
int CDECL _get_doserrno(int *pValue)
Definition: errno.c:243
static char str_EPERM[]
Definition: errno.c:39
static _invalid_parameter_handler invalid_parameter_handler
Definition: errno.c:129
__msvcrt_ulong *CDECL __doserrno(void)
Definition: errno.c:223
int CDECL __wcserror_s(wchar_t *buffer, size_t nc, const wchar_t *str)
Definition: errno.c:405
static char str_EDEADLK[]
Definition: errno.c:71
static char str_generic_error[]
Definition: errno.c:77
static char str_ENFILE[]
Definition: errno.c:60
unsigned int MSVCRT__sys_nerr
Definition: errno.c:127
int *CDECL _errno(void)
Definition: errno.c:215
static char str_EDOM[]
Definition: errno.c:69
static char str_EBADF[]
Definition: errno.c:47
static char str_ENXIO[]
Definition: errno.c:44
static char str_ENOTTY[]
Definition: errno.c:62
static char str_success[]
Definition: errno.c:38
static char str_ENODEV[]
Definition: errno.c:56
int CDECL _wcserror_s(wchar_t *buffer, size_t nc, int err)
Definition: errno.c:379
static char str_EINVAL[]
Definition: errno.c:59
static char str_ENOEXEC[]
Definition: errno.c:46
static char str_EROFS[]
Definition: errno.c:66
static char str_ERANGE[]
Definition: errno.c:70
static char str_ENOMEM[]
Definition: errno.c:50
static char str_EFBIG[]
Definition: errno.c:63
int CDECL _set_errno(int value)
Definition: errno.c:255
static char str_ECHILD[]
Definition: errno.c:48
static char str_ENAMETOOLONG[]
Definition: errno.c:72
static char str_ENOSYS[]
Definition: errno.c:74
static char str_E2BIG[]
Definition: errno.c:45
static char str_EPIPE[]
Definition: errno.c:68
static char str_EISDIR[]
Definition: errno.c:58
int CDECL _get_errno(int *pValue)
Definition: errno.c:231
char *CDECL _strerror(const char *str)
Definition: errno.c:315
#define ERR_CASE(oserr)
void CDECL _exit(int exitcode)
Definition: exit.c:187
int CDECL _write(int fd, const void *buf, unsigned int count)
Definition: file.c:3561
#define __cdecl
Definition: corecrt.h:121
unsigned int uintptr_t
Definition: corecrt.h:185
unsigned long __msvcrt_ulong
Definition: corecrt.h:168
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
#define ENOENT
Definition: errno.h:25
#define ENOSPC
Definition: errno.h:49
#define EEXIST
Definition: errno.h:39
#define EINVAL
Definition: errno.h:44
#define ECHILD
Definition: errno.h:33
#define ENOEXEC
Definition: errno.h:31
#define EDEADLK
Definition: errno.h:56
#define EPIPE
Definition: errno.h:53
#define EMFILE
Definition: errno.h:46
#define ENOMEM
Definition: errno.h:35
#define EIO
Definition: errno.h:28
#define EBUSY
Definition: errno.h:38
#define ENOTEMPTY
Definition: errno.h:61
#define ERANGE
Definition: errno.h:55
#define ENODEV
Definition: errno.h:41
#define E2BIG
Definition: errno.h:30
#define EACCES
Definition: errno.h:36
#define EBADF
Definition: errno.h:32
#define EAGAIN
Definition: errno.h:34
_ACRTIMP int *__cdecl __sys_nerr(void)
Definition: syserr.cpp:142
_ACRTIMP _invalid_parameter_handler __cdecl _set_thread_local_invalid_parameter_handler(_invalid_parameter_handler)
_ACRTIMP _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void)
void(__cdecl * _invalid_parameter_handler)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned, uintptr_t)
Definition: stdlib.h:259
_ACRTIMP _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler)
_ACRTIMP _invalid_parameter_handler __cdecl _get_thread_local_invalid_parameter_handler(void)
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45
#define MSVCRT_INVALID_PMT(x, err)
Definition: msvcrt.h:376
#define MSVCRT_CHECK_PMT(x)
Definition: msvcrt.h:378
#define L(x)
Definition: resources.c:13
PWCHAR pValue
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum func
Definition: glext.h:6028
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLenum mode
Definition: glext.h:6217
GLenum GLsizei len
Definition: glext.h:6722
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static PVOID ptr
Definition: dispmode.c:27
#define sprintf
Definition: sprintf.c:45
static size_t numberOfElements
Definition: string.c:98
#define STATUS_INVALID_CRUNTIME_PARAMETER
Definition: ntstatus.h:1092
#define err(...)
const WCHAR * str
_ACRTIMP_ALT void __cdecl _invalid_parameter_noinfo(void)
wcstombs
Definition: stdlib.h:1013
strcpy
Definition: string.h:131
#define msvcrt_set_errno
Definition: heap.c:50
#define TRACE(s)
Definition: solgame.cpp:4
Definition: query.h:86
Definition: fci.c:127
Definition: parser.c:49
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23
char **__cdecl __sys_errlist()
Definition: syserr.cpp:147
Definition: pdh_main.c:96
#define ERROR_BAD_NETPATH
Definition: winerror.h:267
#define ERROR_NOT_ENOUGH_QUOTA
Definition: winerror.h:1480
#define ERROR_CURRENT_DIRECTORY
Definition: winerror.h:241
#define ERROR_IO_DEVICE
Definition: winerror.h:977
#define ERROR_NESTING_NOT_ALLOWED
Definition: winerror.h:392
#define ERROR_BAD_ENVIRONMENT
Definition: winerror.h:235
#define ERROR_SHARING_VIOLATION
Definition: winerror.h:257
#define ERROR_POSSIBLE_DEADLOCK
Definition: winerror.h:991
#define ERROR_TOO_MANY_OPEN_FILES
Definition: winerror.h:229
#define ERROR_INVALID_BLOCK
Definition: winerror.h:234
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228
#define ERROR_BAD_PATHNAME
Definition: winerror.h:355
#define ERROR_NO_PROC_SLOTS
Definition: winerror.h:295
#define ERROR_DISK_FULL
Definition: winerror.h:308
#define ERROR_BROKEN_PIPE
Definition: winerror.h:305
#define ERROR_NOT_LOCKED
Definition: winerror.h:352
#define ERROR_CHILD_NOT_COMPLETE
Definition: winerror.h:323
#define ERROR_DIR_NOT_EMPTY
Definition: winerror.h:339
#define ERROR_FILE_EXISTS
Definition: winerror.h:287
#define ERROR_LOCK_VIOLATION
Definition: winerror.h:258
#define ERROR_SEEK_ON_DEVICE
Definition: winerror.h:326
#define ERROR_CANNOT_MAKE
Definition: winerror.h:288
#define ERROR_FAIL_I24
Definition: winerror.h:289
#define ERROR_NO_MORE_FILES
Definition: winerror.h:243
#define ERROR_WAIT_NO_CHILDREN
Definition: winerror.h:322
#define ERROR_BAD_FORMAT
Definition: winerror.h:236
#define ERROR_FILENAME_EXCED_RANGE
Definition: winerror.h:385
#define ERROR_DRIVE_LOCKED
Definition: winerror.h:304
#define ERROR_LOCK_FAILED
Definition: winerror.h:358
#define ERROR_MAX_THRDS_REACHED
Definition: winerror.h:357
#define ERROR_INVALID_ACCESS
Definition: winerror.h:237
#define ERROR_NETWORK_ACCESS_DENIED
Definition: winerror.h:279
#define ERROR_ARENA_TRASHED
Definition: winerror.h:232
#define ERROR_INVALID_DRIVE
Definition: winerror.h:240
#define ERROR_BAD_NET_NAME
Definition: winerror.h:281
#define ERROR_BAD_DEVICE
Definition: winerror.h:1032