> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblPrivacyAddBlockListChangedHandler

> XblPrivacyAddBlockListChangedHandler

Registers an event handler for notifications when the user's block list changes.

## Syntax

```cpp theme={null}
XblFunctionContext XblPrivacyAddBlockListChangedHandler(  
         XblContextHandle xboxLiveContext,  
         XblPrivacyBlockListChangedHandler handler,  
         void* handlerContext  
)  
```

### Parameters

*xboxLiveContext*   \_In\_\
Type: [XblContextHandle](https://docs.xbox.com/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

An XBOX services context handle created with [XblContextCreateHandle](https://docs.xbox.com/reference/live/xsapi-c/xbox_live_context_c/functions/xblcontextcreatehandle.md).

*handler*   \_In\_\
Type: [XblPrivacyBlockListChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacyblocklistchangedhandler.md)

The callback function that receives notifications.

*handlerContext*   \_In\_opt\_\
Type: void\*

Client context pointer to be passed back to the handler.

### Return value

Type: XblFunctionContext

A token that identifies the registered handler. Pass it to [XblPrivacyRemoveBlockListChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacyremoveblocklistchangedhandler.md) to unregister the handler. Returns 0 if *xboxLiveContext* or *handler* is null.

## Remarks

The first handler that you register on an XBOX services context subscribes that context to real-time changes in the user's block list. Later handlers on the same context share that subscription. When you remove the last handler from the context, the context's subscription ends.

The handler receives only the changes to the list, not the current list. To get the full list, call [XblPrivacyGetAvoidListAsync](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacygetavoidlistasync.md).

Call [XblPrivacyRemoveBlockListChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacyremoveblocklistchangedhandler.md) to unregister the event handler.

## Requirements

**Header:** privacy\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[privacy\_c](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/privacy_c_members.md)


## Related topics

- [XblPrivacyBlockListChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacyblocklistchangedhandler.md)
- [XblPrivacyRemoveBlockListChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacyremoveblocklistchangedhandler.md)
- [privacy_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/privacy_c_members.md)
- [Privacy and permissions overview](https://docs.xbox.com/services/xbox-services/fundamentals/identity/privacy/live-privacy-overview.md)
- [XblPrivacyAddMuteListChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacyaddmutelistchangedhandler.md)
