ホーム › System.AddressBook › FLATENTRYLIST
FLATENTRYLIST
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cEntries | DWORD | 4 | +0 | +0 | リストに含まれるエントリの数。 |
| cbEntries | DWORD | 4 | +4 | +4 | abEntries 全体のサイズをバイト単位で示す。 |
| abEntries | BYTE | 1 | +8 | +8 | 連結されたFLATENTRY群の可変長バイト列(先頭バイト)。 |
各言語での定義
#include <windows.h>
// FLATENTRYLIST (x64 12 / x86 12 バイト)
typedef struct FLATENTRYLIST {
DWORD cEntries;
DWORD cbEntries;
BYTE abEntries[1];
} FLATENTRYLIST;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FLATENTRYLIST
{
public uint cEntries;
public uint cbEntries;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] abEntries;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FLATENTRYLIST
Public cEntries As UInteger
Public cbEntries As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public abEntries() As Byte
End Structureimport ctypes
from ctypes import wintypes
class FLATENTRYLIST(ctypes.Structure):
_fields_ = [
("cEntries", wintypes.DWORD),
("cbEntries", wintypes.DWORD),
("abEntries", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct FLATENTRYLIST {
pub cEntries: u32,
pub cbEntries: u32,
pub abEntries: [u8; 1],
}import "golang.org/x/sys/windows"
type FLATENTRYLIST struct {
cEntries uint32
cbEntries uint32
abEntries [1]byte
}type
FLATENTRYLIST = record
cEntries: DWORD;
cbEntries: DWORD;
abEntries: array[0..0] of Byte;
end;const FLATENTRYLIST = extern struct {
cEntries: u32,
cbEntries: u32,
abEntries: [1]u8,
};type
FLATENTRYLIST {.bycopy.} = object
cEntries: uint32
cbEntries: uint32
abEntries: array[1, uint8]struct FLATENTRYLIST
{
uint cEntries;
uint cbEntries;
ubyte[1] abEntries;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FLATENTRYLIST サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; cEntries : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbEntries : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; abEntries : BYTE (+8, 1byte) varptr(st)+8 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FLATENTRYLIST
#field int cEntries
#field int cbEntries
#field byte abEntries 1
#endstruct
stdim st, FLATENTRYLIST ; NSTRUCT 変数を確保
st->cEntries = 100
mes "cEntries=" + st->cEntries