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