DrvFree function (winddi.h)

The DrvFree function is used to notify the driver that the specified structure is no longer needed.

Syntax

void DrvFree(
  PVOID     pv,
  ULONG_PTR id
);

Parameters

pv

Pointer to the structure whose memory is to be freed.

id

Pointer to the identifier that was returned with the structure.

Return value

None

Remarks

DrvFree is an optional function that should be supported only if the driver must be informed when memory associated with structures can be freed. For example, if a FONTOBJ structure is in use, deletion can be deferred until DrvDestroyFont has been called, eliminating the need for the driver to implement DrvFree.

A driver can use id in different ways. It can specify an object handle or it can indicate the way the structure is allocated. For example, it can differentiate between loaded resources and memory allocated from a heap. The driver can ignore this parameter if the structure pointed to by pv contains enough information.

Requirements

Requirement Value
Target Platform Desktop
Header winddi.h (include Winddi.h)

See also

DrvDestroyFont

DrvQueryFont

DrvQueryFontTree