ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Callback Functions Reference > LPFNIG_MEM_REALLOC

Create a function of this type to give your application the flexibility of replacing ImageGear's memory reallocation routine with your own.


Copy Code
        LPBYTE lpBuffer, 
        AT_UINT nSize


Name Type Description
lpBuffer LPBYTE Far pointer to the buffer to be reallocated.
nSize AT_UINT New byte count for realloc buffer.

Return Value:

The user supplied callback function should return a pointer to the allocated block of memory.

Supported Raster Image Formats:

This function does not process image pixels.


Copy Code
/* Memory ReAlloc callback function definition        */
LPBYTE ACCUAPI MyMemReAlloc( LPBYTE lpbuffer, AT_UINT nSize)
        /* Put your memory reallocation code here */
        return( lpBuffer);
/*See also example for IG_mem_CB_register() */


This callback function is registered by calling IG_mem_CB_register(). The register function must be called prior to any user-defined callback functions being used by the ImageGear library.

Is this page helpful?
Yes No
Thanks for your feedback.