跳转到主要内容

XblSocialIncomingFriendRequestCountChangedHandler

在用户收到的好友请求数量发生更改时调用的回调。

语法

参数

eventArgs   _In_
类型:const XblSocialFriendRequestCountChangedEventArgs*
与该更改关联的参数。该结构的字段仅在回调期间有效。 context   _In_opt_
类型:void*
添加处理程序时提供的上下文。

返回值

类型:void

备注

通过调用 XblSocialAddFriendRequestCountChangedHandler 注册此回调。context 参数接收你在注册处理程序时传递的 handlerContext 值。 eventArgs 的 incomingFriendRequestCount 成员包含当前待处理的传入好友请求数量。请复制回调返回后仍需使用的任何值。 XBOX Services API (XSAPI) 会忽略不包含数量的好友请求数量通知,因此不会为此类通知调用回调。

参数属于

XblSocialAddFriendRequestCountChangedHandler

要求

头文件: social_c.h 库: Microsoft.Xbox.Services.142.C.lib 或 Microsoft.Xbox.Services.143.C.lib

另请参阅

social_c
XblSocialFriendRequestCountChangedEventArgs
XblSocialRemoveFriendRequestCountChangedHandler
最后修改于 2026年10月30日