ImageGear Professional v18.1 > 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
|
|
---|---|
typedef LPBYTE (ACCUAPI LPFNIG_MEM_REALLOC) ( 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. |
The user supplied callback function should return a pointer to the allocated block of memory.
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.