IPrintAsyncNotifyDataObject::AcquireData method (prnasnot.h)

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


HRESULT AcquireData(
  [out] BYTE                       **ppNotificationData,
  [out] ULONG                      *pSize,
  [out] PrintAsyncNotificationType **ppSchema


[out] ppNotificationData

A buffer containing the notification data.

[out] pSize

The size of the data buffer.

[out] ppSchema

A GUID pointer to the data schema.

Return value

See PrintAsyncNotifyError for the possible values.

For more information about COM error codes, see Error Handling.


Applications that call this method must call ReleaseData when they have finished consuming the notification data.

The IPrintAsyncNotifyDataObject interface must be implemented to ensure 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.

When the Print Spooler fails, it creates an IPrintAsyncNotifyDataObject object. When a listener calls AcquireData for this notification, ppNotificationData is NULL, the size is 0, and ppSchema is NOTIFICATION_RELEASE.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header prnasnot.h
DLL Prnasnot.dll

See also

Asynchronous Printing Notification Interfaces