This function places an ImageGear warning onto the error stack.
Copy Code
|
|
---|---|
AT_ERRCODE ACCUAPI IG_warning_set( const LPSTR szFileName, INT iLineNumber, AT_ERRCODE iCode, AT_INT lValue1, AT_INT lValue2, const LPSTR szWarning ); |
Name | Type | Description |
---|---|---|
szFileName | const LPSTR | Pointer to a string that supplies the name of the module from which the warning was generated. It is recommended that you use the _FILE_ constant in this field. |
iLineNumber | INT | An integer telling ImageGear from which line the warning was set. It is recommended that you use the _LINE_ constant in this field. |
iCode | AT_ERRCODE | An integer value of type AT_ERRCODE. Set this to the code number of the warning that you wish to place on the error stack. |
lValue1 | AT_INT | The first argument that supplies any supporting information about the warning. Your application might use this value to decide what to do after setting a particular kind of warning. |
lValue2 | AT_INT | The second argument that supplies any supporting information about the warning. Your application might use this value to decide what to do after setting a particular kind of warning. |
szWarning | const LPSTR | Additional text description of the warning. It can be NULL if it is not available. |
Returns the code of the ImageGear error that occurred during this function call. A value of zero means no errors have occurred. Errors that occurred during this function call are not appended onto the error stack.
This function does not process image pixels.
Copy Code
|
|
---|---|
static const AT_ERRCODE MYWARNING = (IGE_LAST_ERROR_NUMBER - 2); AT_ERRCOUNT nErrcount = IG_warning_set(__FILE__, __LINE__, MYWARNING, 0, 0, "Warning message"); |
If you are setting a warning code that you have defined yourself, you must make sure that it has a value less than ImageGear's IGE_LAST_ERROR_NUMBER. As the defined value of IGE_LAST_ERROR_NUMBER may change in the future, you should define your warning codes relatively to IGE_LAST_ERROR_NUMBER, as demonstrated in the example, rather than use literal values.