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

# GetHandle

> IDStorageFileX::GetHandle

# IDStorageFileX::GetHandle

オブジェクトが表すファイルへの Win32 ハンドルを取得します。

## 構文

```cpp theme={null}
HANDLE GetHandle(
)
```

### パラメーター

このメソッドにパラメーターはありません。

### 戻り値

Type: HANDLE

## 解説

ハンドルは `GENERIC_READ` 権限および `FILE_SHARE_READ` 共有モードで開かれます。サイズなど、ファイルに関する情報のクエリに使用できます。

ハンドルが不要になったら、`CloseHandle` を呼び出して閉じます。

詳細については、[DirectStorage の概要](https://docs.xbox.com/ja-jp/build/console-features/storage/directstorage/directstorage-overview.md) の「IDStorageFileX」セクションを参照してください。

## 要件

**ヘッダー:** dstorage\_xs.h

**ライブラリ:** dstorage\_xs.lib

**サポートされているプラットフォーム:** XBOX Series 本体

## 関連項目

[IDStorageFactoryX::OpenFile](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)\
[IDStorageFileX](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)


## Related topics

- [IDStorageFileX (インターフェイスの内容)](https://docs.xbox.com/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)
- [DirectStorage の概要](https://docs.xbox.com/ja-jp/build/console-features/storage/directstorage/directstorage-overview.md)
- [GET (/handles/{handle-id})](https://docs.xbox.com/ja-jp/reference/live/rest/uri/sessiondirectory/uri-handleshandleidget.md)
- [GET (/handles/{handleId}/session)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/sessiondirectory/uri-handleshandleidsessionget.md)
- [GetDescriptorHandleIncrementSize](https://docs.xbox.com/ja-jp/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_getdescriptorhandleincrementsize_public.md)
