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

# DisconnectGamepad

> IXtfInputClient::DisconnectGamepad 메서드

# IXtfInputClient::DisconnectGamepad 메서드

지정된 가상 컨트롤러의 연결을 끊습니다.

## 구문

```cpp theme={null}
public:
HRESULT DisconnectGamepad(
         UINT64 controllerId
)  
```

### 매개 변수

*controllerId*\
형식: UINT64

이 [IXtfInputClient](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)의 디바이스 식별자입니다.

### 반환 값

형식: HRESULT

HRESULT 성공 또는 오류 코드입니다.

## 설명

가상 컨트롤러 작업이 완료되면 가상 컨트롤러에 할당된 리소스가 해제되도록 **DisconnectGamepad**를 호출합니다. [IXtfInputClient::ConnectGamepad](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md) 호출은 모두 **DisconnectGamepad** 호출과 짝지어야 합니다. 만들어진 게임패드의 연결을 끊지 못하면 메모리 누수가 발생합니다. 메모리 누수를 방지하기 위해 [IXtfInputClient::DisconnectAllGamepads](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)를 호출하여 모든 가상 컨트롤러의 연결을 끊을 수 있습니다.

## 요구 사항

**헤더:** xtfinput.h

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

**지원 플랫폼:** Windows(XBOX 콘솔 도구용)

## 함께 보기

[XtfInput](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/xtfinput-xbox-microsoft-n.md)\
[IXtfInputClient](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)\
[IXtfInputClient::ConnectGamepad](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)\
[IXtfInputClient::DisconnectAllGamepads](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)


## Related topics

- [DisconnectAllGamepads](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectallgamepads-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [ConnectGamepad](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient 인터페이스 (인터페이스 콘텐츠)](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)
- [GAMEPAD_VIBRATION](https://docs.xbox.com/ko/reference/tools/xtf/xtfinput/structures/gamepad_vibration.md)
- [XINPUT_GAMEPAD](https://docs.xbox.com/ko/reference/input/xinputongameinput/structs/xinput_gamepad.md)
