RouterAllocPrinterNotifyInfo - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// winsplp.h

PPRINTER_NOTIFY_INFO RouterAllocPrinterNotifyInfo(
  DWORD cPrinterNotifyInfoData
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-winsplp-routerallocprinternotifyinfo)

RouterAllocPrinterNotifyInfo function

Description

The print spooler's RouterAllocPrinterNotifyInfo function allocates a PRINTER_NOTIFY_INFO structure and an array of PRINTER_NOTIFY_INFO_DATA structures. (These structures are described in the Microsoft Windows SDK documentation.)

Parameters

cPrinterNotifyInfoData

Caller-supplied number specifying size of the PRINTER_NOTIFY_INFO_DATA structure array to be allocated.

Return value

The function returns a pointer to the allocated PRINTER_NOTIFY_INFO structure.

Remarks

Print providers should call RouterAllocPrinterNotifyInfo to allocate the PRINTER_NOTIFY_INFO structure and the PRINTER_NOTIFY_INFO_DATA structure array that the provider's RefreshPrinterChangeNotification function must supply.

The RouterAllocPrinterNotifyInfo function initializes the PRINTER_NOTIFY_INFO structure's Version member to the current version of the spooler's notification implementation. It initializes the structure's Flags and Count members to zero, regardless of the number specified for cPrinterNotifyInfoData.

Print providers should call AppendPrinterNotifyInfoData to fill in members of the PRINTER_NOTIFY_INFO_DATA structure array.

If RefreshPrinterChangeNotification executes successfully and returns the allocated structures to the caller, you should assume that the caller will deallocate structure memory. However, if RefreshPrinterChangeNotification encounters an error it should call RouterFreePrinterNotifyInfo to deallocate the memory.

For additional information, see Supporting Printer Change Notifications.

See also

AppendPrinterNotifyInfoData

RefreshPrinterChangeNotification

RouterFreePrinterNotifyInfo