> ## 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.

# XUserRegisterForDeviceAssociationChanged

> XUserRegisterForDeviceAssociationChanged

# XUserRegisterForDeviceAssociationChanged

사용자 디바이스 연결 변경 이벤트에 대한 콜백을 등록합니다.

## 구문

```cpp theme={null}
HRESULT XUserRegisterForDeviceAssociationChanged(  
         XTaskQueueHandle queue,  
         void* context,  
         XUserDeviceAssociationChangedCallback* callback,  
         XTaskQueueRegistrationToken* token  
)  
```

### 매개변수

*queue*   \_In\_opt\_\
형식: XTaskQueueHandle

변경 콜백을 배치할 비동기 큐에 대한 핸들입니다.

*context*   \_In\_opt\_\
형식: void\*

애플리케이션이 정의하고 콜백에 다시 전달하는 콜백입니다.

*callback*   \_In\_\
형식: [XUserDeviceAssociationChangedCallback\*](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserdeviceassociationchangedcallback.md)

애플리케이션이 정의하고 등록하는 콜백입니다.

*token*   \_Out\_\
형식: [XTaskQueueRegistrationToken\*](https://docs.xbox.com/ko/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)

성공 시 콜백을 등록 취소하는 데 사용할 수 있는 콜백을 식별하는 토큰을 포함합니다.

### 반환값

형식: HRESULT

HRESULT 성공 또는 오류 코드입니다.\
오류 코드 목록은 [Error Codes](https://docs.xbox.com/ko/reference/errorcodes.md)를 참조하십시오.

## 설명

> [!NOTE]
>
> 이 함수는 시간에 민감한 스레드에서 호출하는 것이 안전하지 않습니다. 자세한 내용은 [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하십시오.

**XUserDeviceAssociationRegisterForChangeEvent**를 호출해도 이전에 등록된 콜백이 무효화되지 않습니다.

사용자 디바이스 연결 변경 콜백을 등록 취소하려면 [XUserUnregisterForDeviceAssociationChanged](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserunregisterfordeviceassociationchanged.md)를 호출합니다.

기본 엔드포인트가 변경될 때 애플리케이션이 정의하고 호출하는 콜백을 등록하려면 [XUserRegisterForDefaultAudioEndpointUtf16Changed](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed.md)를 호출합니다.

기본 오디오 엔드포인트 변경 콜백을 등록 취소하려면 [XUserUnregisterForDefaultAudioEndpointUtf16Changed](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed.md)를 호출합니다.

## 요구 사항

**헤더:** XUser.h

**라이브러리:** xgameruntime.lib

**지원되는 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 함께 보기

[XUser](https://docs.xbox.com/ko/reference/system/xuser/xuser_members.md)

[XUserUnregisterForDeviceAssociationChanged](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserunregisterfordeviceassociationchanged.md)

[XUserRegisterForDefaultAudioEndpointUtf16Changed](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed.md)

[XUserUnregisterForDefaultAudioEndpointUtf16Changed](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed.md)


## Related topics

- [XUserUnregisterForDeviceAssociationChanged](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserunregisterfordeviceassociationchanged.md)
- [XUserDeviceAssociationChangedCallback](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserdeviceassociationchangedcallback.md)
- [XUserDeviceAssociationChange](https://docs.xbox.com/ko/reference/system/xuser/structs/xuserdeviceassociationchange.md)
- [XUserFindForDevice](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserfindfordevice.md)
- [XUserRegisterForDefaultAudioEndpointUtf16Changed](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed.md)
