ホーム › Storage.Jet › JET_RECPOS
JET_RECPOS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| centriesLT | DWORD | 4 | +4 | +4 | 現在位置より小さい(前方の)エントリ数の概算。 |
| centriesInRange | DWORD | 4 | +8 | +8 | 現在の範囲内に含まれるエントリ数の概算。 |
| centriesTotal | DWORD | 4 | +12 | +12 | インデックス内の総エントリ数の概算。 |
各言語での定義
#include <windows.h>
// JET_RECPOS (x64 16 / x86 16 バイト)
typedef struct JET_RECPOS {
DWORD cbStruct;
DWORD centriesLT;
DWORD centriesInRange;
DWORD centriesTotal;
} JET_RECPOS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JET_RECPOS
{
public uint cbStruct;
public uint centriesLT;
public uint centriesInRange;
public uint centriesTotal;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JET_RECPOS
Public cbStruct As UInteger
Public centriesLT As UInteger
Public centriesInRange As UInteger
Public centriesTotal As UInteger
End Structureimport ctypes
from ctypes import wintypes
class JET_RECPOS(ctypes.Structure):
_fields_ = [
("cbStruct", wintypes.DWORD),
("centriesLT", wintypes.DWORD),
("centriesInRange", wintypes.DWORD),
("centriesTotal", wintypes.DWORD),
]#[repr(C)]
pub struct JET_RECPOS {
pub cbStruct: u32,
pub centriesLT: u32,
pub centriesInRange: u32,
pub centriesTotal: u32,
}import "golang.org/x/sys/windows"
type JET_RECPOS struct {
cbStruct uint32
centriesLT uint32
centriesInRange uint32
centriesTotal uint32
}type
JET_RECPOS = record
cbStruct: DWORD;
centriesLT: DWORD;
centriesInRange: DWORD;
centriesTotal: DWORD;
end;const JET_RECPOS = extern struct {
cbStruct: u32,
centriesLT: u32,
centriesInRange: u32,
centriesTotal: u32,
};type
JET_RECPOS {.bycopy.} = object
cbStruct: uint32
centriesLT: uint32
centriesInRange: uint32
centriesTotal: uint32struct JET_RECPOS
{
uint cbStruct;
uint centriesLT;
uint centriesInRange;
uint centriesTotal;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JET_RECPOS サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; centriesLT : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; centriesInRange : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; centriesTotal : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JET_RECPOS
#field int cbStruct
#field int centriesLT
#field int centriesInRange
#field int centriesTotal
#endstruct
stdim st, JET_RECPOS ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct