ホーム › Data.HtmlHelp › HH_ENUM_IT
HH_ENUM_IT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | INT | 4 | +0 | +0 | この構造体のサイズ(バイト)。 |
| iType | INT | 4 | +4 | +4 | 情報タイプの種別を示す値。 |
| pszCatName | LPSTR | 8/4 | +8 | +8 | 所属するカテゴリ名へのポインタ(ASCII)。NULL可。 |
| pszITName | LPSTR | 8/4 | +16 | +12 | 情報タイプ名へのポインタ(ASCII)。 |
| pszITDescription | LPSTR | 8/4 | +24 | +16 | 情報タイプの説明文へのポインタ(ASCII)。NULL可。 |
各言語での定義
#include <windows.h>
// HH_ENUM_IT (x64 32 / x86 20 バイト)
typedef struct HH_ENUM_IT {
INT cbStruct;
INT iType;
LPSTR pszCatName;
LPSTR pszITName;
LPSTR pszITDescription;
} HH_ENUM_IT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HH_ENUM_IT
{
public int cbStruct;
public int iType;
public IntPtr pszCatName;
public IntPtr pszITName;
public IntPtr pszITDescription;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HH_ENUM_IT
Public cbStruct As Integer
Public iType As Integer
Public pszCatName As IntPtr
Public pszITName As IntPtr
Public pszITDescription As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class HH_ENUM_IT(ctypes.Structure):
_fields_ = [
("cbStruct", ctypes.c_int),
("iType", ctypes.c_int),
("pszCatName", ctypes.c_void_p),
("pszITName", ctypes.c_void_p),
("pszITDescription", ctypes.c_void_p),
]#[repr(C)]
pub struct HH_ENUM_IT {
pub cbStruct: i32,
pub iType: i32,
pub pszCatName: *mut core::ffi::c_void,
pub pszITName: *mut core::ffi::c_void,
pub pszITDescription: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type HH_ENUM_IT struct {
cbStruct int32
iType int32
pszCatName uintptr
pszITName uintptr
pszITDescription uintptr
}type
HH_ENUM_IT = record
cbStruct: Integer;
iType: Integer;
pszCatName: Pointer;
pszITName: Pointer;
pszITDescription: Pointer;
end;const HH_ENUM_IT = extern struct {
cbStruct: i32,
iType: i32,
pszCatName: ?*anyopaque,
pszITName: ?*anyopaque,
pszITDescription: ?*anyopaque,
};type
HH_ENUM_IT {.bycopy.} = object
cbStruct: int32
iType: int32
pszCatName: pointer
pszITName: pointer
pszITDescription: pointerstruct HH_ENUM_IT
{
int cbStruct;
int iType;
void* pszCatName;
void* pszITName;
void* pszITDescription;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; HH_ENUM_IT サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; cbStruct : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; iType : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszCatName : LPSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pszITName : LPSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pszITDescription : LPSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; HH_ENUM_IT サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; cbStruct : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; iType : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszCatName : LPSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pszITName : LPSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszITDescription : LPSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HH_ENUM_IT
#field int cbStruct
#field int iType
#field intptr pszCatName
#field intptr pszITName
#field intptr pszITDescription
#endstruct
stdim st, HH_ENUM_IT ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct