ホーム › Networking.WinInet › INTERNET_CACHE_CONFIG_INFOA
INTERNET_CACHE_CONFIG_INFOA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwStructSize | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示す。 |
| dwContainer | DWORD | 4 | +4 | +4 | 対象とするキャッシュコンテナを示す値である。 |
| dwQuota | DWORD | 4 | +8 | +8 | キャッシュに割り当てられた上限容量である。 |
| dwReserved4 | DWORD | 4 | +12 | +12 | 予約フィールドである。使用されない。 |
| fPerUser | BOOL | 4 | +16 | +16 | ユーザ単位のキャッシュかどうかを示す真偽値である。 |
| dwSyncMode | DWORD | 4 | +20 | +20 | キャッシュの同期モードを示す値である。 |
| dwNumCachePaths | DWORD | 4 | +24 | +24 | キャッシュパスエントリの数である。 |
| Anonymous | _Anonymous_e__Union | 264 | +32 | +28 | キャッシュパス情報またはサイズ値を格納する無名共用体である。 |
| dwNormalUsage | DWORD | 4 | +296 | +292 | 通常キャッシュの現在使用量である。 |
| dwExemptUsage | DWORD | 4 | +300 | +296 | 除外(消去対象外)キャッシュの使用量である。 |
共用体: _Anonymous_e__Union x64 264B / x86 264B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Anonymous | _Anonymous_e__Struct | 8/4 | +0 | +0 | キャッシュパス情報またはサイズ値を格納する無名共用体である。 |
| CachePaths | INTERNET_CACHE_CONFIG_PATH_ENTRYA | 264 | +0 | +0 |
各言語での定義
#include <windows.h>
// INTERNET_CACHE_CONFIG_INFOA (x64 304 / x86 300 バイト)
typedef struct INTERNET_CACHE_CONFIG_INFOA {
DWORD dwStructSize;
DWORD dwContainer;
DWORD dwQuota;
DWORD dwReserved4;
BOOL fPerUser;
DWORD dwSyncMode;
DWORD dwNumCachePaths;
_Anonymous_e__Union Anonymous;
DWORD dwNormalUsage;
DWORD dwExemptUsage;
} INTERNET_CACHE_CONFIG_INFOA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct INTERNET_CACHE_CONFIG_INFOA
{
public uint dwStructSize;
public uint dwContainer;
public uint dwQuota;
public uint dwReserved4;
[MarshalAs(UnmanagedType.Bool)] public bool fPerUser;
public uint dwSyncMode;
public uint dwNumCachePaths;
public _Anonymous_e__Union Anonymous;
public uint dwNormalUsage;
public uint dwExemptUsage;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure INTERNET_CACHE_CONFIG_INFOA
Public dwStructSize As UInteger
Public dwContainer As UInteger
Public dwQuota As UInteger
Public dwReserved4 As UInteger
<MarshalAs(UnmanagedType.Bool)> Public fPerUser As Boolean
Public dwSyncMode As UInteger
Public dwNumCachePaths As UInteger
Public Anonymous As _Anonymous_e__Union
Public dwNormalUsage As UInteger
Public dwExemptUsage As UInteger
End Structureimport ctypes
from ctypes import wintypes
class INTERNET_CACHE_CONFIG_INFOA(ctypes.Structure):
_fields_ = [
("dwStructSize", wintypes.DWORD),
("dwContainer", wintypes.DWORD),
("dwQuota", wintypes.DWORD),
("dwReserved4", wintypes.DWORD),
("fPerUser", wintypes.BOOL),
("dwSyncMode", wintypes.DWORD),
("dwNumCachePaths", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
("dwNormalUsage", wintypes.DWORD),
("dwExemptUsage", wintypes.DWORD),
]#[repr(C)]
pub struct INTERNET_CACHE_CONFIG_INFOA {
pub dwStructSize: u32,
pub dwContainer: u32,
pub dwQuota: u32,
pub dwReserved4: u32,
pub fPerUser: i32,
pub dwSyncMode: u32,
pub dwNumCachePaths: u32,
pub Anonymous: _Anonymous_e__Union,
pub dwNormalUsage: u32,
pub dwExemptUsage: u32,
}import "golang.org/x/sys/windows"
type INTERNET_CACHE_CONFIG_INFOA struct {
dwStructSize uint32
dwContainer uint32
dwQuota uint32
dwReserved4 uint32
fPerUser int32
dwSyncMode uint32
dwNumCachePaths uint32
Anonymous _Anonymous_e__Union
dwNormalUsage uint32
dwExemptUsage uint32
}type
INTERNET_CACHE_CONFIG_INFOA = record
dwStructSize: DWORD;
dwContainer: DWORD;
dwQuota: DWORD;
dwReserved4: DWORD;
fPerUser: BOOL;
dwSyncMode: DWORD;
dwNumCachePaths: DWORD;
Anonymous: _Anonymous_e__Union;
dwNormalUsage: DWORD;
dwExemptUsage: DWORD;
end;const INTERNET_CACHE_CONFIG_INFOA = extern struct {
dwStructSize: u32,
dwContainer: u32,
dwQuota: u32,
dwReserved4: u32,
fPerUser: i32,
dwSyncMode: u32,
dwNumCachePaths: u32,
Anonymous: _Anonymous_e__Union,
dwNormalUsage: u32,
dwExemptUsage: u32,
};type
INTERNET_CACHE_CONFIG_INFOA {.bycopy.} = object
dwStructSize: uint32
dwContainer: uint32
dwQuota: uint32
dwReserved4: uint32
fPerUser: int32
dwSyncMode: uint32
dwNumCachePaths: uint32
Anonymous: _Anonymous_e__Union
dwNormalUsage: uint32
dwExemptUsage: uint32struct INTERNET_CACHE_CONFIG_INFOA
{
uint dwStructSize;
uint dwContainer;
uint dwQuota;
uint dwReserved4;
int fPerUser;
uint dwSyncMode;
uint dwNumCachePaths;
_Anonymous_e__Union Anonymous;
uint dwNormalUsage;
uint dwExemptUsage;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; INTERNET_CACHE_CONFIG_INFOA サイズ: 300 バイト(x86)
dim st, 75 ; 4byte整数×75(構造体サイズ 300 / 4 切り上げ)
; dwStructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwContainer : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwQuota : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwReserved4 : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; fPerUser : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwSyncMode : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwNumCachePaths : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+28, 264byte) varptr(st)+28 を基点に操作(264byte:入れ子/配列)
; dwNormalUsage : DWORD (+292, 4byte) st.73 = 値 / 値 = st.73 (lpoke/lpeek も可)
; dwExemptUsage : DWORD (+296, 4byte) st.74 = 値 / 値 = st.74 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; INTERNET_CACHE_CONFIG_INFOA サイズ: 304 バイト(x64)
dim st, 76 ; 4byte整数×76(構造体サイズ 304 / 4 切り上げ)
; dwStructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwContainer : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwQuota : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwReserved4 : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; fPerUser : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwSyncMode : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwNumCachePaths : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+32, 264byte) varptr(st)+32 を基点に操作(264byte:入れ子/配列)
; dwNormalUsage : DWORD (+296, 4byte) st.74 = 値 / 値 = st.74 (lpoke/lpeek も可)
; dwExemptUsage : DWORD (+300, 4byte) st.75 = 値 / 値 = st.75 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global INTERNET_CACHE_CONFIG_INFOA
#field int dwStructSize
#field int dwContainer
#field int dwQuota
#field int dwReserved4
#field bool fPerUser
#field int dwSyncMode
#field int dwNumCachePaths
#field byte Anonymous 264
#field int dwNormalUsage
#field int dwExemptUsage
#endstruct
stdim st, INTERNET_CACHE_CONFIG_INFOA ; NSTRUCT 変数を確保
st->dwStructSize = 100
mes "dwStructSize=" + st->dwStructSize
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。