4 * Copyright (c) 1998 Mark Russinovich
6 * http://www.sysinternals.com/
8 * --------------------------------------------------------------------
10 * This software is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
15 * This software is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details.
20 * You should have received a copy of the GNU Library General Public
21 * License along with this software; see the file COPYING.LIB. If
22 * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
23 * Cambridge, MA 02139, USA.
25 * --------------------------------------------------------------------
27 * Print a Win32 error.
29 * 1999 February (Emanuele Aliberti)
30 * Taken from chkdskx.c and formatx.c by Mark Russinovich
31 * to be used in all sysutils.
36 //----------------------------------------------------------------------
40 // Takes the win32 error code and prints the text version.
42 //----------------------------------------------------------------------
52 (FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM
),
55 MAKELANGID(LANG_NEUTRAL
, SUBLANG_DEFAULT
),
65 LocalFree( lpMsgBuf
);