RouterCreatePrintAsyncNotificationChannel function (prnasntp.h)

The RouterCreatePrintAsyncNotificationChannel function creates an asynchronous notification channel that is associated with a printer or print server.

Syntax

HRESULT RouterCreatePrintAsyncNotificationChannel(
  [in] PCWSTR                            pName,
  [in] PrintAsyncNotificationType        *pNotificationType,
       PrintAsyncNotifyUserFilter        eNotifyFilter,
  [in] PrintAsyncNotifyConversationStyle eConversationStyle,
  [in] IPrintAsyncNotifyCallback         *pCallback,
       IPrintAsyncNotifyChannel          **ppIAsynchNotification
);

Parameters

[in] pName

A pointer to a null-terminated string that specifies the name of the printer or print server.

[in] pNotificationType

A pointer to a GUID that represents the type of notifications sent through this channel.

eNotifyFilter

A filter for the session or user that receives the notifications.

[in] eConversationStyle

The type of communication: unidirectional or bidirectional.

[in] pCallback

A pointer to the callback function that is called to deliver the response notifications, when bidirectional communication is in effect. This parameter is ignored when unidirectional communication is in effect.

ppIAsynchNotification

A pointer to a variable that receives the address of the interface object that represents the notification channel.

Return value

RouterCreatePrintAsyncNotificationChannel returns S_OK on success and returns a standard COM error code otherwise.

Remarks

In some cases, you must release the channel that you created with the RouterCreatePrintAsyncNotificationChannel function by calling Release on IPrintAsyncNotifyChannel.

For information about when to release a channel, see Notification Channel.

Requirements

Requirement Value
Target Platform Desktop
Header prnasntp.h (include Prnasntp.h)
Library Spoolss.lib
DLL Spoolss.dll