0x0001  ERR_GALLOC              GlobalAlloc failed. This error value is sent by KERNEL.
0x0002  ERR_GREALLOC            GlobalReAlloc failed. This error value is sent by KERNEL.
0x0003  ERR_GLOCK               GlobalLock failed. This error value is sent by KERNEL.
0x0004  ERR_LALLOC              LocalAlloc failed. This error value is sent by KERNEL.
0x0005  ERR_LREALLOC            LocalReAlloc failed. This error value is sent by KERNEL.
0x0006  ERR_LLOCK               LocalLock failed. This error value is sent by KERNEL.
0x0007  ERR_ALLOCRES            AllocResource failed. This error value is sent by KERNEL.
0x0008  ERR_LOCKRES             LockResource failed. This error value is sent by KERNEL.
0x0009  ERR_LOADMODULE          LoadModule failed. This error value is sent by KERNEL.
0x0040  ERR_CREATEDLG           Dialog box could not be created because LoadMenu failed. This error value is sent by USER.
0x0041  ERR_CREATEDLG2          Dialog box could not be created because CreateWindow failed. This error value is sent by USER.
0x0042  ERR_REGISTERCLASS       RegisterClass failed because the class is already registered. This error value is sent by USER.
0x0043  ERR_DCBUSY              Device-context cache is full. This error value is sent by USER.
0x0044  ERR_CREATEWND           Window could not be created because the class was not found. This error value is sent by USER.
0x0045  ERR_STRUCEXTRA          Program is using unallocated space. This error value is sent by USER.
0x0046  ERR_LOADSTR             LoadString failed. This error value is sent by USER.
0x0047  ERR_LOADMENU            LoadMenu failed. This error value is sent by USER.
0x0048  ERR_NESTEDBEGINPAINT    Program contains nested BeginPaint functions. This error value is sent by USER.
0x0049  ERR_BADINDEX            Index to GetClassLong, GetClassWord, GetWindowLong, GetWindowWord, SetClassLong, SetClassWord, SetWindowLong, or SetWindowWord is invalid. This error value is sent by USER.
0x004A  ERR_CREATEMENU          Menu could not be created. This error value is sent by USER.
0x0080  ERR_CREATEDC            CreateCompatibleDC, CreateDC, or CreateIC failed. This error value is sent by GDI.
0x0081  ERR_CREATEMETA          CreateMetaFile failed. This error value is sent by GDI.
0x0082  ERR_DELOBJSELECTED      Program is trying to delete a bitmap that is selected into the device context. This error value is sent by GDI.
0x0083  ERR_SELBITMAP           Program is trying to select a bitmap that is already selected. This error value is sent by GDI.
0x6001  ERR_BAD_VALUE           A 16-bit signed or unsigned value is invalid.
0x6002  ERR_BAD_FLAGS           One or more bit flags are invalid.
0x6003  ERR_BAD_INDEX           Index is invalid or out of range.
0x6009  ERR_BAD_SELECTOR        Selector is invalid.
0x600B  ERR_BAD_HANDLE          Generic handle is invalid.
0x6020  ERR_BAD_HINSTANCE       Instance handle is invalid. This error value is sent by KERNEL.
0x6021  ERR_BAD_HMODULE         Module handle is invalid. This error value is sent by KERNEL.
0x6022  ERR_BAD_GLOBAL_HANDLE   Global handle is invalid. This error value is sent by KERNEL.
0x6023  ERR_BAD_LOCAL_HANDLE    Local handle is invalid. This error value is sent by KERNEL.
0x6024  ERR_BAD_ATOM            Atom is invalid. This error value is sent by KERNEL.
0x6025  ERR_BAD_HFILE           File handle is invalid. This error value is sent by KERNEL.
0x6040  ERR_BAD_HWND            Window handle is invalid. This error value is sent by USER.
0x6041  ERR_BAD_HMENU           Menu handle is invalid. This error value is sent by USER.
0x6042  ERR_BAD_HCURSOR         Cursor handle is invalid. This error value is sent by USER.
0x6043  ERR_BAD_HICON           Icon handle is invalid. This error value is sent by USER.
0x6044  ERR_BAD_HDWP            Handle to a window-position structure is invalid. This error value is sent by USER.
0x6045  ERR_BAD_CID             Communications identifier (CID) is invalid. This error value is sent by USER.
0x6046  ERR_BAD_HDRVR           Installable-driver handle is invalid. This error value is sent by USER.
0x6061  ERR_BAD_GDI_OBJECT      GDI object is invalid. This error value is sent by GDI.
0x6062  ERR_BAD_HDC             Device-context handle is invalid. This error value is sent by GDI.
0x6063  ERR_BAD_HPEN            Pen handle is invalid. This error value is sent by GDI.
0x6064  ERR_BAD_HFONT           Font handle is invalid. This error value is sent by GDI.
0x6065  ERR_BAD_HBRUSH          Brush handle is invalid. This error value is sent by GDI.
0x6066  ERR_BAD_HBITMAP         Bitmap handle is invalid. This error value is sent by GDI.
0x6067  ERR_BAD_HRGN            Region handle is invalid. This error value is sent by GDI.
0x6068  ERR_BAD_HPALETTE        Palette handle is invalid. This error value is sent by GDI.
0x6069  ERR_BAD_HMETAFILE       Metafile handle is invalid. This error value is sent by GDI.
0x7004  ERR_BAD_DVALUE          A 32-bit signed or unsigned value is invalid.
0x7005  ERR_BAD_DFLAGS          One or more 32-bit flags are invalid.
0x7006  ERR_BAD_DINDEX          A 32-bit index is invalid or out of range.
0x7007  ERR_BAD_PTR             Pointer is invalid.
0x7008  ERR_BAD_FUNC_PTR        Function pointer is invalid.
0x700A  ERR_BAD_STRING_PTR      Zero-terminated string pointer is invalid.
0x7060  ERR_BAD_COORDS          X- and y-coordinates are invalid. This error value is sent by GDI.

The following error values may have been combined with other values in the preceding table to identify the type of error:

Value   Constant                Meaning


0x4000  ERR_PARAM               Parameter is invalid. This flag is always set for parameter-validation error messages.
0x8000  ERR_WARNING             Nonfatal error occurred. An invalid parameter was detected, but the error was not serious enough to cause the function to fail. The invalid parameter is reported, but the function executes as usual.

To determine the size of an invalid parameter, you can combine ERR_SIZE_MASK (0x3000) with other error values by using the AND operator. The following table gives the possible results of this operation:

Value   Constant                Meaning


0x1000  ERR_BYTE                An 8-bit parameter is invalid.
0x2000  ERR_WORD                A 16-bit parameter is invalid.
0x3000  ERR_DWORD               A 32-bit parameter is invalid.







