Creating an Error Callback Function

The following example is a simple error callback function. Register this callback by using the capSetCallbackOnError macro.

// ErrorCallbackProc: error callback function

// hWnd: capture window handle

// nErrID: error code for the encountered error

// lpErrorText: error text string for the encountered error


LRESULT PASCAL ErrorCallbackProc(HWND hWnd, int nErrID,

LPSTR lpErrorText)


if (!ghWndMain)

return FALSE;

if (nErrID == 0) // Starting a new major function.

return TRUE; // Clear out old errors.

// Show the error identifier and text.

wsprintf(gachBuffer, "Error# %d", nErrID);

MessageBox(hWnd, lpErrorText, gachBuffer,


return (LRESULT) TRUE;


Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database