IPrintAsyncNotifyDataObject interface (prnasnot.h)

Encapsulates the data sent in a notification channel.

Inheritance

The IPrintAsyncNotifyDataObject interface inherits from the IUnknown interface. IPrintAsyncNotifyDataObject also has these types of members:

Methods

The IPrintAsyncNotifyDataObject interface has these methods.

 
IPrintAsyncNotifyDataObject::AcquireData

Directs listening applications to the notification data, including the data's size and type.
IPrintAsyncNotifyDataObject::ReleaseData

Releases the memory used by the data encapsulated in IPrintAsyncNotifyDataObject.

Remarks

Listening applications must call ReleaseData when they have finished consuming the notification data obtained with AcquireData.

The IPrintAsyncNotifyDataObject interface must be implemented in a way that ensures that a call of IUnknown::Release does not free the object if a listening application has not finished consuming the object's data. Accordingly, if a call to Release occurs when an application has called AcquireData but has not yet called ReleaseData , then the object must not be freed. For this reason, we recommend that AcquireData use IUnknown::AddRef to increment the object's reference count and that ReleaseData decrement the count.

Listening applications can live within the Print Spooler's process as well as outside it. When the listener is outside of this process, it can access only the IPrintAsyncNotifyDataObject methods. Hence, if your IPrintAsyncNotifyDataObject also implements an interface of your own, be aware that your interface's methods are available only to listening applications within the Print Spooler's process.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header prnasnot.h

See also

Asynchronous Printing Notification Interfaces

Printing