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

# IGameInputDevice::GetDisplayName

> 입력 장치의 친숙한 표시 이름을 UTF-8 문자열로 가져옵니다.

입력 장치의 친숙한 표시 이름을 UTF-8 문자열로 가져옵니다.

## 구문

```cpp theme={null}
uint32_t GetDisplayName(
    uint32_t bufferByteCount,
    char* buffer
);
```

### 매개변수

*bufferByteCount*   \_In\_\
형식: uint32\_t

*buffer*가 가리키는 버퍼의 크기(바이트)입니다. 필요한 크기를 쿼리하려면 0을 전달하세요.

*buffer*   \_Out\_writes\_bytes\_opt\_(bufferByteCount)\
형식: char\*

null로 끝나는 UTF-8 표시 이름을 받는 버퍼입니다. 필요한 크기를 쿼리하려면 `nullptr`을 전달하세요.

### 반환값

형식: uint32\_t

null 종결자를 포함하여 표시 이름을 저장하는 데 필요한 버퍼의 크기(바이트)입니다.

## 설명

이 메서드는 *buffer*가 `nullptr`이 아니고 *bufferByteCount*가 필요한 크기 이상인 경우에만 *buffer*에 표시 이름을 기록합니다. 그렇지 않으면 버퍼가 수정되지 않습니다. 표시 이름을 검색하려면 *bufferByteCount*를 0으로, *buffer*를 `nullptr`로 지정하여 메서드를 한 번 호출해 필요한 크기를 가져오고, 해당 크기의 버퍼를 할당한 다음, 메서드를 다시 호출하세요.

장치에 표시 이름이 없으면 필요한 크기는 1이며, 메서드는 빈 문자열을 기록합니다.

표시 이름은 장치의 "친숙한" 이름입니다. 애플리케이션의 UI에 표시할 수 있지만 현지화된다는 보장은 없습니다. GameInput은 이 문자열을 여러 위치에서 검색하며, 최종 폴백 중 하나는 장치의 펌웨어입니다.

표시 이름은 장치 개체의 수명 동안 변경되지 않습니다.

다음 예제는 장치의 표시 이름을 검색합니다.

```cpp theme={null}
std::string GetDeviceDisplayName(IGameInputDevice* device)
{
    const uint32_t size = device->GetDisplayName(0, nullptr);
    if (size == 0)
    {
        return {};
    }

    std::vector<char> buffer(size);
    device->GetDisplayName(size, buffer.data());

    return std::string(buffer.data());
}
```

GameInput v3 이하에서는 [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md)가 반환하는 [GameInputDeviceInfo](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 구조체의 `displayName` 멤버에서 이 정보를 얻을 수 있었습니다.

## 요구 사항

**헤더:** GameInput.h

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

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

## 함께 보기

[GameInput 개요](https://docs.xbox.com/ko/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInputDevice::GetPnpPath](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getpnppath.md)

## 버전 기록

| 버전 | 변경 사항 |
| - | - |
| **v4** | 도입됨. |


## Related topics

- [IGameInputDevice::GetPnpPath](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getpnppath.md)
- [IGameInputDevice::GetDeviceFamily](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicefamily.md)
- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
- [IGameInputDevice::GetXInputDeviceIndex](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getxinputdeviceindex.md)
- [IGameInputDevice::GetUsage](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getusage.md)
