ホーム › Storage.Jet › JET_TABLECREATE3_A
JET_TABLECREATE3_A
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| szTableName | CHAR* | 8/4 | +8 | +4 | 作成するテーブルの名前(ANSI文字列)へのポインタ。 |
| szTemplateTableName | CHAR* | 8/4 | +16 | +8 | 継承元となるテンプレートテーブル名(ANSI文字列)へのポインタ。NULL可。 |
| ulPages | DWORD | 4 | +24 | +12 | テーブルに初期確保するページ数。 |
| ulDensity | DWORD | 4 | +28 | +16 | テーブルページの初期充填率(パーセント)。 |
| rgcolumncreate | JET_COLUMNCREATE_A* | 8/4 | +32 | +20 | 作成する列定義の配列JET_COLUMNCREATE_Aへのポインタ。 |
| cColumns | DWORD | 4 | +40 | +24 | rgcolumncreate配列の要素数。 |
| rgindexcreate | JET_INDEXCREATE2_A* | 8/4 | +48 | +28 | 作成するインデックス定義の配列JET_INDEXCREATE2_Aへのポインタ。 |
| cIndexes | DWORD | 4 | +56 | +32 | rgindexcreate配列の要素数。 |
| szCallback | CHAR* | 8/4 | +64 | +36 | テーブルに関連付けるコールバック関数名(ANSI文字列)へのポインタ。NULL可。 |
| cbtyp | DWORD | 4 | +72 | +40 | コールバックを呼び出すイベント種別を示す値。 |
| grbit | DWORD | 4 | +76 | +44 | テーブル作成オプションを示すフラグ群。 |
| pSeqSpacehints | JET_SPACEHINTS* | 8/4 | +80 | +48 | シーケンシャル領域の確保ヒントJET_SPACEHINTSへのポインタ。NULL可。 |
| pLVSpacehints | JET_SPACEHINTS* | 8/4 | +88 | +52 | ロング値領域の確保ヒントJET_SPACEHINTSへのポインタ。NULL可。 |
| cbSeparateLV | DWORD | 4 | +96 | +56 | ロング値を別ページに分離する閾値バイト数。 |
| tableid | JET_TABLEID | 8/4 | +104 | +60 | 作成後に返されるテーブルID。 |
| cCreated | DWORD | 4 | +112 | +64 | 実際に作成されたオブジェクト数(出力)。 |
各言語での定義
#include <windows.h>
// JET_TABLECREATE3_A (x64 120 / x86 68 バイト)
typedef struct JET_TABLECREATE3_A {
DWORD cbStruct;
CHAR* szTableName;
CHAR* szTemplateTableName;
DWORD ulPages;
DWORD ulDensity;
JET_COLUMNCREATE_A* rgcolumncreate;
DWORD cColumns;
JET_INDEXCREATE2_A* rgindexcreate;
DWORD cIndexes;
CHAR* szCallback;
DWORD cbtyp;
DWORD grbit;
JET_SPACEHINTS* pSeqSpacehints;
JET_SPACEHINTS* pLVSpacehints;
DWORD cbSeparateLV;
JET_TABLEID tableid;
DWORD cCreated;
} JET_TABLECREATE3_A;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JET_TABLECREATE3_A
{
public uint cbStruct;
public IntPtr szTableName;
public IntPtr szTemplateTableName;
public uint ulPages;
public uint ulDensity;
public IntPtr rgcolumncreate;
public uint cColumns;
public IntPtr rgindexcreate;
public uint cIndexes;
public IntPtr szCallback;
public uint cbtyp;
public uint grbit;
public IntPtr pSeqSpacehints;
public IntPtr pLVSpacehints;
public uint cbSeparateLV;
public UIntPtr tableid;
public uint cCreated;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JET_TABLECREATE3_A
Public cbStruct As UInteger
Public szTableName As IntPtr
Public szTemplateTableName As IntPtr
Public ulPages As UInteger
Public ulDensity As UInteger
Public rgcolumncreate As IntPtr
Public cColumns As UInteger
Public rgindexcreate As IntPtr
Public cIndexes As UInteger
Public szCallback As IntPtr
Public cbtyp As UInteger
Public grbit As UInteger
Public pSeqSpacehints As IntPtr
Public pLVSpacehints As IntPtr
Public cbSeparateLV As UInteger
Public tableid As UIntPtr
Public cCreated As UInteger
End Structureimport ctypes
from ctypes import wintypes
class JET_TABLECREATE3_A(ctypes.Structure):
_fields_ = [
("cbStruct", wintypes.DWORD),
("szTableName", ctypes.c_void_p),
("szTemplateTableName", ctypes.c_void_p),
("ulPages", wintypes.DWORD),
("ulDensity", wintypes.DWORD),
("rgcolumncreate", ctypes.c_void_p),
("cColumns", wintypes.DWORD),
("rgindexcreate", ctypes.c_void_p),
("cIndexes", wintypes.DWORD),
("szCallback", ctypes.c_void_p),
("cbtyp", wintypes.DWORD),
("grbit", wintypes.DWORD),
("pSeqSpacehints", ctypes.c_void_p),
("pLVSpacehints", ctypes.c_void_p),
("cbSeparateLV", wintypes.DWORD),
("tableid", ctypes.c_size_t),
("cCreated", wintypes.DWORD),
]#[repr(C)]
pub struct JET_TABLECREATE3_A {
pub cbStruct: u32,
pub szTableName: *mut core::ffi::c_void,
pub szTemplateTableName: *mut core::ffi::c_void,
pub ulPages: u32,
pub ulDensity: u32,
pub rgcolumncreate: *mut core::ffi::c_void,
pub cColumns: u32,
pub rgindexcreate: *mut core::ffi::c_void,
pub cIndexes: u32,
pub szCallback: *mut core::ffi::c_void,
pub cbtyp: u32,
pub grbit: u32,
pub pSeqSpacehints: *mut core::ffi::c_void,
pub pLVSpacehints: *mut core::ffi::c_void,
pub cbSeparateLV: u32,
pub tableid: usize,
pub cCreated: u32,
}import "golang.org/x/sys/windows"
type JET_TABLECREATE3_A struct {
cbStruct uint32
szTableName uintptr
szTemplateTableName uintptr
ulPages uint32
ulDensity uint32
rgcolumncreate uintptr
cColumns uint32
rgindexcreate uintptr
cIndexes uint32
szCallback uintptr
cbtyp uint32
grbit uint32
pSeqSpacehints uintptr
pLVSpacehints uintptr
cbSeparateLV uint32
tableid uintptr
cCreated uint32
}type
JET_TABLECREATE3_A = record
cbStruct: DWORD;
szTableName: Pointer;
szTemplateTableName: Pointer;
ulPages: DWORD;
ulDensity: DWORD;
rgcolumncreate: Pointer;
cColumns: DWORD;
rgindexcreate: Pointer;
cIndexes: DWORD;
szCallback: Pointer;
cbtyp: DWORD;
grbit: DWORD;
pSeqSpacehints: Pointer;
pLVSpacehints: Pointer;
cbSeparateLV: DWORD;
tableid: NativeUInt;
cCreated: DWORD;
end;const JET_TABLECREATE3_A = extern struct {
cbStruct: u32,
szTableName: ?*anyopaque,
szTemplateTableName: ?*anyopaque,
ulPages: u32,
ulDensity: u32,
rgcolumncreate: ?*anyopaque,
cColumns: u32,
rgindexcreate: ?*anyopaque,
cIndexes: u32,
szCallback: ?*anyopaque,
cbtyp: u32,
grbit: u32,
pSeqSpacehints: ?*anyopaque,
pLVSpacehints: ?*anyopaque,
cbSeparateLV: u32,
tableid: usize,
cCreated: u32,
};type
JET_TABLECREATE3_A {.bycopy.} = object
cbStruct: uint32
szTableName: pointer
szTemplateTableName: pointer
ulPages: uint32
ulDensity: uint32
rgcolumncreate: pointer
cColumns: uint32
rgindexcreate: pointer
cIndexes: uint32
szCallback: pointer
cbtyp: uint32
grbit: uint32
pSeqSpacehints: pointer
pLVSpacehints: pointer
cbSeparateLV: uint32
tableid: uint
cCreated: uint32struct JET_TABLECREATE3_A
{
uint cbStruct;
void* szTableName;
void* szTemplateTableName;
uint ulPages;
uint ulDensity;
void* rgcolumncreate;
uint cColumns;
void* rgindexcreate;
uint cIndexes;
void* szCallback;
uint cbtyp;
uint grbit;
void* pSeqSpacehints;
void* pLVSpacehints;
uint cbSeparateLV;
size_t tableid;
uint cCreated;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; JET_TABLECREATE3_A サイズ: 68 バイト(x86)
dim st, 17 ; 4byte整数×17(構造体サイズ 68 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; szTableName : CHAR* (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; szTemplateTableName : CHAR* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ulPages : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ulDensity : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; rgcolumncreate : JET_COLUMNCREATE_A* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; cColumns : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; rgindexcreate : JET_INDEXCREATE2_A* (+28, 4byte) varptr(st)+28 を基点に操作(4byte:入れ子/配列)
; cIndexes : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; szCallback : CHAR* (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; cbtyp : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; grbit : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; pSeqSpacehints : JET_SPACEHINTS* (+48, 4byte) varptr(st)+48 を基点に操作(4byte:入れ子/配列)
; pLVSpacehints : JET_SPACEHINTS* (+52, 4byte) varptr(st)+52 を基点に操作(4byte:入れ子/配列)
; cbSeparateLV : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; tableid : JET_TABLEID (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; cCreated : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JET_TABLECREATE3_A サイズ: 120 バイト(x64)
dim st, 30 ; 4byte整数×30(構造体サイズ 120 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; szTableName : CHAR* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; szTemplateTableName : CHAR* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ulPages : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ulDensity : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; rgcolumncreate : JET_COLUMNCREATE_A* (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; cColumns : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; rgindexcreate : JET_INDEXCREATE2_A* (+48, 8byte) varptr(st)+48 を基点に操作(8byte:入れ子/配列)
; cIndexes : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; szCallback : CHAR* (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; cbtyp : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; grbit : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; pSeqSpacehints : JET_SPACEHINTS* (+80, 8byte) varptr(st)+80 を基点に操作(8byte:入れ子/配列)
; pLVSpacehints : JET_SPACEHINTS* (+88, 8byte) varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; cbSeparateLV : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; tableid : JET_TABLEID (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; cCreated : DWORD (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JET_TABLECREATE3_A
#field int cbStruct
#field intptr szTableName
#field intptr szTemplateTableName
#field int ulPages
#field int ulDensity
#field intptr rgcolumncreate
#field int cColumns
#field intptr rgindexcreate
#field int cIndexes
#field intptr szCallback
#field int cbtyp
#field int grbit
#field intptr pSeqSpacehints
#field intptr pLVSpacehints
#field int cbSeparateLV
#field intptr tableid
#field int cCreated
#endstruct
stdim st, JET_TABLECREATE3_A ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct