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

# IDStorageFileX::GetHandle

> IDStorageFileX::GetHandle

# IDStorageFileX::GetHandle

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

## 構文

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

### パラメーター

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

### 戻り値

Type: HANDLE

## 解説

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

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

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

## 要件

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

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

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

## 関連項目

[IDStorageFactoryX::OpenFile](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile)\
[IDStorageFileX](/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex)


## Related topics

- [IDStorageFileX](/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)
- [DirectStorage の概要](/ja-jp/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFileX::Close](/ja-jp/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close.md)
- [IDStorageFactoryX::OpenFile](/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)
- [DStorage](/ja-jp/reference/system/dstorage/dstorage_members.md)
