Win32 API 日本語リファレンス
ホームStorage.Jet › JET_INDEX_COLUMN

JET_INDEX_COLUMN

構造体
サイズx64: 24 バイト / x86: 20 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
columnidDWORD4+0+0条件評価の対象となる列の識別子。
relopJET_RELOP4+4+4比較演算子を示すJET_RELOP列挙値(等号、不等号等)。
pvvoid*8/4+8+8比較対象となる値データへのポインタ。
cbDWORD4+16+12pvが指す値データのバイト長。
grbitDWORD4+20+16比較動作を制御するフラグ群。

各言語での定義

#include <windows.h>

// JET_INDEX_COLUMN  (x64 24 / x86 20 バイト)
typedef struct JET_INDEX_COLUMN {
    DWORD columnid;
    JET_RELOP relop;
    void* pv;
    DWORD cb;
    DWORD grbit;
} JET_INDEX_COLUMN;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JET_INDEX_COLUMN
{
    public uint columnid;
    public int relop;
    public IntPtr pv;
    public uint cb;
    public uint grbit;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JET_INDEX_COLUMN
    Public columnid As UInteger
    Public relop As Integer
    Public pv As IntPtr
    Public cb As UInteger
    Public grbit As UInteger
End Structure
import ctypes
from ctypes import wintypes

class JET_INDEX_COLUMN(ctypes.Structure):
    _fields_ = [
        ("columnid", wintypes.DWORD),
        ("relop", ctypes.c_int),
        ("pv", ctypes.c_void_p),
        ("cb", wintypes.DWORD),
        ("grbit", wintypes.DWORD),
    ]
#[repr(C)]
pub struct JET_INDEX_COLUMN {
    pub columnid: u32,
    pub relop: i32,
    pub pv: *mut core::ffi::c_void,
    pub cb: u32,
    pub grbit: u32,
}
import "golang.org/x/sys/windows"

type JET_INDEX_COLUMN struct {
	columnid uint32
	relop int32
	pv uintptr
	cb uint32
	grbit uint32
}
type
  JET_INDEX_COLUMN = record
    columnid: DWORD;
    relop: Integer;
    pv: Pointer;
    cb: DWORD;
    grbit: DWORD;
  end;
const JET_INDEX_COLUMN = extern struct {
    columnid: u32,
    relop: i32,
    pv: ?*anyopaque,
    cb: u32,
    grbit: u32,
};
type
  JET_INDEX_COLUMN {.bycopy.} = object
    columnid: uint32
    relop: int32
    pv: pointer
    cb: uint32
    grbit: uint32
struct JET_INDEX_COLUMN
{
    uint columnid;
    int relop;
    void* pv;
    uint cb;
    uint grbit;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; JET_INDEX_COLUMN サイズ: 20 バイト(x86)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; columnid : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; relop : JET_RELOP (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pv : void* (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; cb : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; grbit : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JET_INDEX_COLUMN サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; columnid : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; relop : JET_RELOP (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pv : void* (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; cb : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; grbit : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JET_INDEX_COLUMN
    #field int columnid
    #field int relop
    #field intptr pv
    #field int cb
    #field int grbit
#endstruct

stdim st, JET_INDEX_COLUMN        ; NSTRUCT 変数を確保
st->columnid = 100
mes "columnid=" + st->columnid