Share via


PFN_CSP_REALLOC function pointer

This topic is not current. For the most current information about the Smart Card API, see Smart Card Minidriver Specification.

The PFN_CSP_REALLOC function pointer points to a function that changes the size of a previously allocated block of memory. The existing contents of the memory block are copied to the reallocated block.

Syntax

typedef LPVOID ( WINAPI *PFN_CSP_REALLOC)(
  _In_ LPVOID Address,
  _In_ SIZE_T Size
);

Parameters

Address [in]

A pointer to the address of the memory block to reallocate.

Size [in]

The size, in bytes, of the reallocated memory block.

Return value

If the function succeeds, the function returns a pointer to the reallocated block of memory.

If the function fails, it returns NULL.

Remarks

The existing contents of the memory block are copied to the reallocated block. If the size of the reallocated block of memory is smaller than the size of the data to be copied, the data is truncated to the size of the reallocated block of memory.

This function pointer is passed to a card module in a CARD_DATA structure when the Microsoft Base Smart Card Cryptographic Service Provider calls the CardAcquireContext function.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Cardmod.h

See also

CARD_DATA

CardAcquireContext

PFN_CSP_ALLOC

PFN_CSP_FREE