LogParamError

3.1

  void LogParamError(uErr, lpfn, lpvParam)    
  UINT uErr; /* error type */
  FARPROC lpfn; /* address where error occurred */
  void FAR* lpvParam; /* address of more error information */

The LogParamError function identifies the most recent parameter validation error. An application's interrupt callback function typically calls LogParamError to return information about an invalid parameter to the user.

Parameters

uErr

Specifies the type of parameter validation error that occurred. The lpvParam parameter may point to more information about the error, depending on the value of uErr. This parameter may be one or more of the following values:

Value Meaning

ERR_BAD_ATOM Invalid atom.
ERR_BAD_CID Invalid communications identifier (CID).
ERR_BAD_COORDS Invalid x,y coordinates.
ERR_BAD_DFLAGS Invalid 32-bit flags.
ERR_BAD_DINDEX Invalid 32-bit index or index out-of-range.
ERR_BAD_DVALUE Invalid 32-bit signed or unsigned value.
ERR_BAD_FLAGS Invalid bit flags.
ERR_BAD_FUNC_PTR Invalid function pointer.
ERR_BAD_GDI_OBJECT Invalid graphics device interface (GDI) object.
ERR_BAD_GLOBAL_HANDLE Invalid global handle.
ERR_BAD_HANDLE Invalid generic handle.
ERR_BAD_HBITMAP Invalid bitmap handle.
ERR_BAD_HBRUSH Invalid brush handle.
ERR_BAD_HCURSOR Invalid cursor handle.
ERR_BAD_HDC Invalid device context (DC) handle.
ERR_BAD_HDRVR Invalid driver handle.
ERR_BAD_HDWP Invalid handle of a window-position structure.
ERR_BAD_HFILE Invalid file handle.
ERR_BAD_HFONT Invalid font handle.
ERR_BAD_HICON Invalid icon handle.
ERR_BAD_HINSTANCE Invalid instance handle.
ERR_BAD_HMENU Invalid menu handle.
ERR_BAD_HMETAFILE Invalid metafile handle.
ERR_BAD_HMODULE Invalid module handle.
ERR_BAD_HPALETTE Invalid palette handle.
ERR_BAD_HPEN Invalid pen handle.
ERR_BAD_HRGN Invalid region handle.
ERR_BAD_HWND Invalid window handle.
ERR_BAD_INDEX Invalid index or index out-of-range.
ERR_BAD_LOCAL_HANDLE Invalid local handle.
ERR_BAD_PTR Invalid pointer.
ERR_BAD_SELECTOR Invalid selector.
ERR_BAD_STRING_PTR Invalid zero-terminated string pointer.
ERR_BAD_VALUE Invalid 16-bit signed or unsigned value.
ERR_BYTE Invalid 8-bit parameter.
ERR_DWORD Invalid 32-bit parameter.
ERR_PARAM A parameter validation error occurred. This flag is always set.
ERR_SIZE_MASK Identifies which 2 bits of uErr specify the size of the invalid parameter.
ERR_WARNING An invalid parameter was detected, but the error is not serious enough to cause the function to fail. The invalid parameter is reported, but the call runs as usual.
ERR_WORD Invalid 16-bit parameter.

lpfn

Specifies the address at which the parameter error occurred. This value is NULL if the address is unknown.

lpvParam

Points to more information about the error. The value of lpvParam depends on the value of uErr. If the value of (uErr & ERR_SIZE_MASK) is 0, lpvParam is undefined. Currently, no uErr code has defined meanings for lpvParam.

Return Value

This function does not return a value.

Comments

The errors identified by LogParamError may be trapped by the callback function that NotifyRegister installs.

Error values whose low 12 bits are less than 0x07FF are reserved for use by Windows.

The size of the value passed in lpvParam is determined by the values of the bits selected by ERR_SIZE_MASK, as follows:

switch (err & ERR_SIZE_MASK)
{
case ERR_BYTE:          /* 8-bit invalid parameter */
    b = LOBYTE(param);
    break;

case ERR_WORD:          /* 16-bit invalid parameter */
    w = LOWORD(param);
    break;

case ERR_DWORD:         /* 32-bit invalid parameter */
    l = (DWORD)param;
    break:

default:                /* invalid parameter value is unknown */
    break;
}

See Also

LogError, NotifyRegister