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

# IXtfInputClient::DisconnectGamepad 메서드

> IXtfInputClient::DisconnectGamepad 메서드

# IXtfInputClient::DisconnectGamepad 메서드

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

<a id="syntaxSection" />

## 구문

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

<a id="ID4EG" />

### 매개 변수

*controllerId*\
형식: UINT64

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

<a id="ID4EP" />

### 반환 값

형식: HRESULT

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

<a id="remarks" />

## 설명

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

<a id="requirements" />

## 요구 사항

**헤더:** xtfinput.h

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

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

## 함께 보기

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


## Related topics

- [IXtfInputClient::DisconnectAllGamepads 메서드](/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectallgamepads-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient::ConnectGamepad 메서드](/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient::SendGamepadReport 메서드](/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/sendgamepadreport-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient::SendGamepadReportEx](/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportex.md)
- [IXtfInputClient::SendGamepadReportWithAudio](/ko/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/ixtfinputclient_sendgamepadreportwithaudio.md)
