This function registers an ART callback function (see the callback functions at the end of this reference in the section ART Component Callback Functions Reference).
Copy Code
|
|
---|---|
AT_ERRCOUNT ART_callback_register( HIGEAR hIGear, AT_MODE nCallbackID, LPFNIG_ART_CALLBACKFUNC lpfnCallback, LPVOID lpPrivate ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle to the image. |
nCallbackID | AT_MODE | An ART-defined constant of type AT_MODE that tells which type of callback is being registered. |
lpfnCallback | LPFNIG_ART_CALLBACKFUNC | A far pointer to your callback function to register. |
lpPrivate | LPVOID | A far pointer to private data (passed to callback function). |
Returns the number of ImageGear errors that occurred during the function call.
All pixel formats supported by ImageGear for C and C++.
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_ERRCOUNT nErrcount; /* Tally of IG errors on */ /* the stack */ VOID privateData; /* Any private data that you */ /* would like to pass to the */ /* callback */ nErrcount = ART_callback_register(hIGear, ART_CALLBACK_CREATE_MODIFY ,myCallbackFunc, (LPVOID) &privateData); |
To unregister a function, pass NULL to the lpfnCallback parameter.
nCallbackID is a predefined value that identifies the type of callback to register. The predefined constants for this variable reside in ARTAPI.H and begin with the prefix ART_CALLBACK_. Only one callback of each type may be registered at the same time.
An error is set if any of the following conditions are met: