ホーム › Storage.Jet › JET_OPENTEMPORARYTABLE
JET_OPENTEMPORARYTABLE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| prgcolumndef | JET_COLUMNDEF* | 8/4 | +8 | +4 | 一時テーブルの列定義配列JET_COLUMNDEFへのポインタ。 |
| ccolumn | DWORD | 4 | +16 | +8 | prgcolumndef配列の列数。 |
| pidxunicode | JET_UNICODEINDEX* | 8/4 | +24 | +12 | ソートに用いるUnicode照合設定JET_UNICODEINDEXへのポインタ。NULL可。 |
| grbit | DWORD | 4 | +32 | +16 | 一時テーブルの動作を制御するフラグ群(重複排除、順序固定等)。 |
| prgcolumnid | DWORD* | 8/4 | +40 | +20 | 作成後に各列の列IDを受け取る配列へのポインタ(出力)。 |
| cbKeyMost | DWORD | 4 | +48 | +24 | ソートキーの最大バイト長。0で既定値。 |
| cbVarSegMac | DWORD | 4 | +52 | +28 | 可変長セグメントの最大バイト数。 |
| tableid | JET_TABLEID | 8/4 | +56 | +32 | 作成後に返される一時テーブルのテーブルID。 |
各言語での定義
#include <windows.h>
// JET_OPENTEMPORARYTABLE (x64 64 / x86 36 バイト)
typedef struct JET_OPENTEMPORARYTABLE {
DWORD cbStruct;
JET_COLUMNDEF* prgcolumndef;
DWORD ccolumn;
JET_UNICODEINDEX* pidxunicode;
DWORD grbit;
DWORD* prgcolumnid;
DWORD cbKeyMost;
DWORD cbVarSegMac;
JET_TABLEID tableid;
} JET_OPENTEMPORARYTABLE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JET_OPENTEMPORARYTABLE
{
public uint cbStruct;
public IntPtr prgcolumndef;
public uint ccolumn;
public IntPtr pidxunicode;
public uint grbit;
public IntPtr prgcolumnid;
public uint cbKeyMost;
public uint cbVarSegMac;
public UIntPtr tableid;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JET_OPENTEMPORARYTABLE
Public cbStruct As UInteger
Public prgcolumndef As IntPtr
Public ccolumn As UInteger
Public pidxunicode As IntPtr
Public grbit As UInteger
Public prgcolumnid As IntPtr
Public cbKeyMost As UInteger
Public cbVarSegMac As UInteger
Public tableid As UIntPtr
End Structureimport ctypes
from ctypes import wintypes
class JET_OPENTEMPORARYTABLE(ctypes.Structure):
_fields_ = [
("cbStruct", wintypes.DWORD),
("prgcolumndef", ctypes.c_void_p),
("ccolumn", wintypes.DWORD),
("pidxunicode", ctypes.c_void_p),
("grbit", wintypes.DWORD),
("prgcolumnid", ctypes.c_void_p),
("cbKeyMost", wintypes.DWORD),
("cbVarSegMac", wintypes.DWORD),
("tableid", ctypes.c_size_t),
]#[repr(C)]
pub struct JET_OPENTEMPORARYTABLE {
pub cbStruct: u32,
pub prgcolumndef: *mut core::ffi::c_void,
pub ccolumn: u32,
pub pidxunicode: *mut core::ffi::c_void,
pub grbit: u32,
pub prgcolumnid: *mut core::ffi::c_void,
pub cbKeyMost: u32,
pub cbVarSegMac: u32,
pub tableid: usize,
}import "golang.org/x/sys/windows"
type JET_OPENTEMPORARYTABLE struct {
cbStruct uint32
prgcolumndef uintptr
ccolumn uint32
pidxunicode uintptr
grbit uint32
prgcolumnid uintptr
cbKeyMost uint32
cbVarSegMac uint32
tableid uintptr
}type
JET_OPENTEMPORARYTABLE = record
cbStruct: DWORD;
prgcolumndef: Pointer;
ccolumn: DWORD;
pidxunicode: Pointer;
grbit: DWORD;
prgcolumnid: Pointer;
cbKeyMost: DWORD;
cbVarSegMac: DWORD;
tableid: NativeUInt;
end;const JET_OPENTEMPORARYTABLE = extern struct {
cbStruct: u32,
prgcolumndef: ?*anyopaque,
ccolumn: u32,
pidxunicode: ?*anyopaque,
grbit: u32,
prgcolumnid: ?*anyopaque,
cbKeyMost: u32,
cbVarSegMac: u32,
tableid: usize,
};type
JET_OPENTEMPORARYTABLE {.bycopy.} = object
cbStruct: uint32
prgcolumndef: pointer
ccolumn: uint32
pidxunicode: pointer
grbit: uint32
prgcolumnid: pointer
cbKeyMost: uint32
cbVarSegMac: uint32
tableid: uintstruct JET_OPENTEMPORARYTABLE
{
uint cbStruct;
void* prgcolumndef;
uint ccolumn;
void* pidxunicode;
uint grbit;
void* prgcolumnid;
uint cbKeyMost;
uint cbVarSegMac;
size_t tableid;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; JET_OPENTEMPORARYTABLE サイズ: 36 バイト(x86)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; prgcolumndef : JET_COLUMNDEF* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; ccolumn : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pidxunicode : JET_UNICODEINDEX* (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; grbit : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; prgcolumnid : DWORD* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; cbKeyMost : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cbVarSegMac : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; tableid : JET_TABLEID (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JET_OPENTEMPORARYTABLE サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; prgcolumndef : JET_COLUMNDEF* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; ccolumn : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pidxunicode : JET_UNICODEINDEX* (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; grbit : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; prgcolumnid : DWORD* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; cbKeyMost : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; cbVarSegMac : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; tableid : JET_TABLEID (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JET_OPENTEMPORARYTABLE
#field int cbStruct
#field intptr prgcolumndef
#field int ccolumn
#field intptr pidxunicode
#field int grbit
#field intptr prgcolumnid
#field int cbKeyMost
#field int cbVarSegMac
#field intptr tableid
#endstruct
stdim st, JET_OPENTEMPORARYTABLE ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct