xlAutoFree

Provided by some DLLs. This routine is called by Microsoft Excel when DLL-managed memory needs to be freed. Inside the xlAutoFree function, callbacks into Microsoft Excel are disabled, with one exception: xlFree can be called to free Microsoft Excel allocated memory. This function receives a pointer to the XLOPER to be freed as the only argument.

This function does not return a value.

Syntax

void WINAPI xlAutoFree(LPXLOPER pxFree);

pxFree (LPXLOPER)

A pointer to the memory to be freed.

Remarks

If the xlAutoFree function you provide looks at the xltype field of pxFree, remember that the xlbitDLLFree bit will still be set.

In Windows, xlStack, xlEnableXLMsgs, and xlDisableXLMsgs can also be called.

Example

\SAMPLES\EXAMPLE\EXAMPLE.C

void WINAPI xlAutoFree(LPXLOPER pxFree)
{
    GlobalUnlock(hArray);
    GlobalFree(hArray);
    return;
}