Microsoft DirectX 8.1 (C++)

CBaseAllocator::SetNotify

The SetNotify method is obsolete.

Syntax

HRESULT SetNotify(
    IMemAllocatorNotifyCallbackTemp *pNotify
);

Parameters

pNotify

Pointer to an IMemAllocatorNotifyCallbackTemp interface, implemented by the caller.

Return Value

Returns S_OK.

Remarks

This method sepecifies a callback method to be called each time a sample is released.

The IMemAllocatorNotifyCallbackTemp interface is no longer supported, but this method remains in the CBaseAllocator class for backward compatibility. You can find the interface definition in the file Axcore.idl; however, it is not recommended that you use it.

This method sets the CBaseAllocator::m_pNotify member variable equal to pNotify and increments the reference count on the interface. If m_pNotify is non-NULL, the CBaseAllocator::ReleaseBuffer method calls IMemAllocatorNotifyCallbackTemp::NotifyRelease. The call can occur in any context, so when you implement the NotifyRelease method, be careful not to make calls that could block. For example, limit the method to setting an event or posting a message for another thread.

See Also