Win32 toast - 在Proc COM服务器中 [英] Win32 toasts - In Proc COM Server

查看:56
本文介绍了Win32 toast - 在Proc COM服务器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以注册一个进程COM服务器来处理来自操作中心的激活回调吗?


这是关于在操作中心持久保存本地Toast通知,并将其作为调用当用户对它采取行动时。


谢谢!

解决方案

嗨miniy,


感谢您发布此处。


根据我的搜索,您可以从Action Center注册COM激活器来调用您的Win32应用程序。


参与Action Center的Win32组件需要创建一个公开以下接口的COM组件:

 interface INotificationActivationCallback:IUnknown 
{
HRESULT激活(
[in,string] LPCWSTR appUserModelId,
[in,string] LPCWSTR参数,//来自调用按钮的arugments
[in,size_is( count),unique] const NOTIFICATION_USER_INPUT_DATA * data,//来自XML $ b $中所有输入元素的数据b [in] ULONG count);
};

我们可以尝试通过界面发送和处理标准Toast通知。


您可以参考
文档


最好的问候,


Hart




Can we register an in proc COM server to handle activation callbacks from action center?

This is about persisting a local toast notification in action center, and having it invoked as and when, user takes action on it.

Thanks!

解决方案

Hi miniy,

Thank you for posting here.

Based on my search, you can register COM activator from Action Center to call your Win32 app.

A Win32 component that participates with Action Center will need to create a COM component that exposes the following interface:

interface INotificationActivationCallback : IUnknown 
{
    HRESULT Activate(
        [in, string] LPCWSTR appUserModelId,
        [in, string] LPCWSTR arguments, // arugments from the invoked button
        [in, size_is(count), unique] const NOTIFICATION_USER_INPUT_DATA* data, // data from all the input elements in the XML
        [in] ULONG count); 
};

we can try sending and handling standard toast notifications with the interface.

You can reference the document.

Best Regards,

Hart


这篇关于Win32 toast - 在Proc COM服务器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆