ホーム › Storage.Jet › JET_OBJECTINFO
JET_OBJECTINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| objtyp | DWORD | 4 | +4 | +4 | オブジェクトの種別を示す値(テーブル等のJET_objtyp)。 |
| dtCreate | DOUBLE | 8 | +8 | +8 | オブジェクトの作成日時(OLEオートメーション形式のDOUBLE)。 |
| dtUpdate | DOUBLE | 8 | +16 | +16 | オブジェクトの最終更新日時(OLEオートメーション形式のDOUBLE)。 |
| grbit | DWORD | 4 | +24 | +24 | オブジェクト作成時に指定されたオプションビット群。 |
| flags | DWORD | 4 | +28 | +28 | オブジェクトの状態を示すフラグ群(システムテーブル等)。 |
| cRecord | DWORD | 4 | +32 | +32 | オブジェクト(テーブル)内のレコード数の概算。 |
| cPage | DWORD | 4 | +36 | +36 | オブジェクトが使用するページ数の概算。 |
各言語での定義
#include <windows.h>
// JET_OBJECTINFO (x64 40 / x86 40 バイト)
#pragma pack(push, 4)
typedef struct JET_OBJECTINFO {
DWORD cbStruct;
DWORD objtyp;
DOUBLE dtCreate;
DOUBLE dtUpdate;
DWORD grbit;
DWORD flags;
DWORD cRecord;
DWORD cPage;
} JET_OBJECTINFO;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct JET_OBJECTINFO
{
public uint cbStruct;
public uint objtyp;
public double dtCreate;
public double dtUpdate;
public uint grbit;
public uint flags;
public uint cRecord;
public uint cPage;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure JET_OBJECTINFO
Public cbStruct As UInteger
Public objtyp As UInteger
Public dtCreate As Double
Public dtUpdate As Double
Public grbit As UInteger
Public flags As UInteger
Public cRecord As UInteger
Public cPage As UInteger
End Structureimport ctypes
from ctypes import wintypes
class JET_OBJECTINFO(ctypes.Structure):
_pack_ = 4
_fields_ = [
("cbStruct", wintypes.DWORD),
("objtyp", wintypes.DWORD),
("dtCreate", ctypes.c_double),
("dtUpdate", ctypes.c_double),
("grbit", wintypes.DWORD),
("flags", wintypes.DWORD),
("cRecord", wintypes.DWORD),
("cPage", wintypes.DWORD),
]#[repr(C, packed(4))]
pub struct JET_OBJECTINFO {
pub cbStruct: u32,
pub objtyp: u32,
pub dtCreate: f64,
pub dtUpdate: f64,
pub grbit: u32,
pub flags: u32,
pub cRecord: u32,
pub cPage: u32,
}import "golang.org/x/sys/windows"
type JET_OBJECTINFO struct {
cbStruct uint32
objtyp uint32
dtCreate float64
dtUpdate float64
grbit uint32
flags uint32
cRecord uint32
cPage uint32
}type
JET_OBJECTINFO = packed record
cbStruct: DWORD;
objtyp: DWORD;
dtCreate: Double;
dtUpdate: Double;
grbit: DWORD;
flags: DWORD;
cRecord: DWORD;
cPage: DWORD;
end;const JET_OBJECTINFO = extern struct {
cbStruct: u32,
objtyp: u32,
dtCreate: f64,
dtUpdate: f64,
grbit: u32,
flags: u32,
cRecord: u32,
cPage: u32,
};type
JET_OBJECTINFO {.packed.} = object
cbStruct: uint32
objtyp: uint32
dtCreate: float64
dtUpdate: float64
grbit: uint32
flags: uint32
cRecord: uint32
cPage: uint32align(4)
struct JET_OBJECTINFO
{
uint cbStruct;
uint objtyp;
double dtCreate;
double dtUpdate;
uint grbit;
uint flags;
uint cRecord;
uint cPage;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JET_OBJECTINFO サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; objtyp : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dtCreate : DOUBLE (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; dtUpdate : DOUBLE (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; grbit : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; flags : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; cRecord : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; cPage : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JET_OBJECTINFO, pack=4
#field int cbStruct
#field int objtyp
#field double dtCreate
#field double dtUpdate
#field int grbit
#field int flags
#field int cRecord
#field int cPage
#endstruct
stdim st, JET_OBJECTINFO ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct