RouterRegisterForPrintAsyncNotifications 函数 (prnasntp.h)
函数 RouterRegisterForPrintAsyncNotifications
注册与打印机或打印服务器关联的异步通知。
语法
HRESULT RouterRegisterForPrintAsyncNotifications(
[in] PCWSTR pName,
[in] PrintAsyncNotificationType *pNotificationType,
[in] PrintAsyncNotifyUserFilter eNotifyFilter,
[in] PrintAsyncNotifyConversationStyle eConversationStyle,
[in] IPrintAsyncNotifyCallback *pCallback,
[out] HANDLE *phNotify
);
参数
[in] pName
指向以 null 结尾的字符串的指针,该字符串指定打印机或打印服务器的名称。
[in] pNotificationType
指向 GUID 的指针,该 GUID 表示对调用方感兴趣的通知类型。
[in] eNotifyFilter
接收通知时与调用方感兴趣的会话或用户的筛选器。
[in] eConversationStyle
通信类型:单向或双向。
[in] pCallback
指向使用的回调的指针,用于传递通知。
[out] phNotify
指向不透明句柄的指针。 调用方可以使用此句柄停止接收通知。
返回值
此函数在成功时返回S_OK,否则返回标准 COM 错误代码。
要求
要求 | 值 |
---|---|
目标平台 | 桌面 |
标头 | prnasntp.h (包括 Prnasntp.h) |
Library | Spoolss.lib |
DLL | Spoolss.dll |