JET_PFNREALLOC Callback Function

Applies to: Windows | Windows Server

JET_PFNREALLOC Callback Function

The JET_PFNREALLOC function is a realloc compatible callback used by JetEnumerateColumns to allocate memory for its output buffers.

    void * JET_API JET_PFNREALLOC(
      [in]                 void* pvContext,
      [in]                 void* pv,
      [in]                 unsigned long cb
    );

Parameters

pvContext

The context pointer given to JetEnumerateColumns. This context pointer can be used to convey state from the caller of JetEnumerateColumns to the implementation of this callback.

pv

If non-NULL, specifies a pointer to a memory block previously allocated by this callback. If NULL, a new memory block of the requested size will be allocated.

cb

The new size of the memory block in bytes. If this parameter is 0 (zero) and a memory block is specified, that memory block will be freed.

Return Value

The system may generate success or failure codes as a result of a call to this function. For information about how to return these codes as HRESULTs, see Extensible Storage Engine Errors.

Return code

Description

Success

If a previously allocated memory block was specified and a new size of zero was specified then that block is freed and NULL will be returned. If a previously allocated memory block was specified and a non-zero new size was specified then the reallocated memory block is returned. If no memory block was specified then a newly allocated memory block of the specified size is returned.

Failure

NULL will be returned. If a previously allocated memory block was provided then that block will remain allocated.

Requirements

Requirement Value

Client

Requires Windows Vista, Windows XP, or Windows 2000 Professional.

Server

Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.

Header

Declared in Esent.h.

See Also

JetEnumerateColumns