// d3dumddi.h
PFND3DDDI_OFFERALLOCATIONSCB Pfnd3dddiOfferallocationscb;
HRESULT Pfnd3dddiOfferallocationscb(
HANDLE hDevice,
const D3DDDICB_OFFERALLOCATIONS *unnamedParam2
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Called by the user-mode display driver to offer video memory allocations for reuse.
hDeviceA handle to the display device (graphics context). The Direct3D runtime passed the user-mode driver this handle as the hDevice member of the D3DDDIARG_CREATEDEVICE structure at device creation.
unnamedParam2pData [in]
A pointer to a D3DDDICB_OFFERALLOCATIONS structure that defines the video memory allocations that the driver offers.
Returns one of the following values.
| Return code | Description |
|---|---|
| S_OK | The allocations were successfully offered. Note: If the driver does not need to call pfnOfferAllocationsCb, it should return S_OK. |
| D3DDDIERR_DEVICEREMOVED | The video memory manager or display miniport driver could not complete the operation because either a Plug and Play (PnP) Stop event or a Timeout Detection and Recovery (TDR) event occurred. Note: If this error code is returned, the driver's calling function (typically the pfnOfferResources routine) must return this error code to the Direct3D runtime. |
| E_INVALIDARG | An invalid parameter was supplied. |
The user-mode display driver calls pfnOfferAllocationsCb to notify the Microsoft DirectX graphics kernel subsystem that, after it completes any previously submitted render operations, it can offer the allocations' memory for other processes to use.
After the driver calls pfnOfferAllocationsCb to offer an allocation to reuse, it must call pfnReclaimAllocationsCb before it locks the allocation or submits it for rendering operations.