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

# IGameInputDispatcher::OpenWaitHandle

> IGameInputDispatcher::OpenWaitHandle

# IGameInputDispatcher::OpenWaitHandle

傳回等候控制代碼，此控制代碼會在發送器佇列中有可用的工作時發出訊號。

## 語法

```cpp theme={null}
HRESULT OpenWaitHandle(
    HANDLE* waitHandle
);
```

### 參數

*waitHandle*   \_Outptr\_result\_nullonfailure\_\
類型：HANDLE\*

傳回的等候控制代碼。

### 傳回值

類型：HRESULT

函式結果

### 備註

`IGameInputDispatcher::OpenWaitHandle` 會傳回等候控制代碼。此方法會在發送器佇列中有可用的工作時發出訊號。當不再需要控制代碼時，請對其呼叫 [CloseHandle](https://learn.microsoft.com/windows/desktop/api/handleapi/nf-handleapi-closehandle) 函式。如需 GameInput API 的中階和進階使用案例，請參閱 [進階 GameInput 主題](/zh-TW/build/core-features/common/input/advanced/input-advanced-topics)。

## 需求

**標頭：** GameInput.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[GameInput 概觀](/zh-TW/build/core-features/common/input/overviews/input-overview)\
[IGameInputDispatcher](/zh-TW/reference/input/gameinput/interfaces/IGameInputDispatcher/igameinputdispatcher)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v0** | 已推出。 |


## Related topics

- [IGameInputDispatcher::OpenWaitHandle](/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_openwaithandle.md)
- [IGameInput::CreateDispatcher](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createdispatcher.md)
