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

JET_RETRIEVECOLUMN

構造体
サイズx64: 48 バイト / x86: 36 バイト

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

フィールド

フィールドサイズx64x86説明
columnidDWORD4+0+0値を取得する対象列の識別子。
pvDatavoid*8/4+8+4取得した値を受け取るバッファへのポインタ。
cbDataDWORD4+16+8pvDataバッファのバイトサイズ。
cbActualDWORD4+20+12実際の値のバイト長(出力)。バッファ不足判定に用いる。
grbitDWORD4+24+16取得動作を制御するフラグ群。
ibLongValueDWORD4+28+20ロング値内で取得を開始するバイトオフセット。
itagSequenceDWORD4+32+24多値列で取得する値の序数(1始まり)。
columnidNextTaggedDWORD4+36+28次のタグ付き列の列IDを返すフィールド(出力)。
errINT4+40+32この列取得の結果を示すJETエラーコード(出力)。

各言語での定義

#include <windows.h>

// JET_RETRIEVECOLUMN  (x64 48 / x86 36 バイト)
typedef struct JET_RETRIEVECOLUMN {
    DWORD columnid;
    void* pvData;
    DWORD cbData;
    DWORD cbActual;
    DWORD grbit;
    DWORD ibLongValue;
    DWORD itagSequence;
    DWORD columnidNextTagged;
    INT err;
} JET_RETRIEVECOLUMN;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JET_RETRIEVECOLUMN
{
    public uint columnid;
    public IntPtr pvData;
    public uint cbData;
    public uint cbActual;
    public uint grbit;
    public uint ibLongValue;
    public uint itagSequence;
    public uint columnidNextTagged;
    public int err;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JET_RETRIEVECOLUMN
    Public columnid As UInteger
    Public pvData As IntPtr
    Public cbData As UInteger
    Public cbActual As UInteger
    Public grbit As UInteger
    Public ibLongValue As UInteger
    Public itagSequence As UInteger
    Public columnidNextTagged As UInteger
    Public err As Integer
End Structure
import ctypes
from ctypes import wintypes

class JET_RETRIEVECOLUMN(ctypes.Structure):
    _fields_ = [
        ("columnid", wintypes.DWORD),
        ("pvData", ctypes.c_void_p),
        ("cbData", wintypes.DWORD),
        ("cbActual", wintypes.DWORD),
        ("grbit", wintypes.DWORD),
        ("ibLongValue", wintypes.DWORD),
        ("itagSequence", wintypes.DWORD),
        ("columnidNextTagged", wintypes.DWORD),
        ("err", ctypes.c_int),
    ]
#[repr(C)]
pub struct JET_RETRIEVECOLUMN {
    pub columnid: u32,
    pub pvData: *mut core::ffi::c_void,
    pub cbData: u32,
    pub cbActual: u32,
    pub grbit: u32,
    pub ibLongValue: u32,
    pub itagSequence: u32,
    pub columnidNextTagged: u32,
    pub err: i32,
}
import "golang.org/x/sys/windows"

type JET_RETRIEVECOLUMN struct {
	columnid uint32
	pvData uintptr
	cbData uint32
	cbActual uint32
	grbit uint32
	ibLongValue uint32
	itagSequence uint32
	columnidNextTagged uint32
	err int32
}
type
  JET_RETRIEVECOLUMN = record
    columnid: DWORD;
    pvData: Pointer;
    cbData: DWORD;
    cbActual: DWORD;
    grbit: DWORD;
    ibLongValue: DWORD;
    itagSequence: DWORD;
    columnidNextTagged: DWORD;
    err: Integer;
  end;
const JET_RETRIEVECOLUMN = extern struct {
    columnid: u32,
    pvData: ?*anyopaque,
    cbData: u32,
    cbActual: u32,
    grbit: u32,
    ibLongValue: u32,
    itagSequence: u32,
    columnidNextTagged: u32,
    err: i32,
};
type
  JET_RETRIEVECOLUMN {.bycopy.} = object
    columnid: uint32
    pvData: pointer
    cbData: uint32
    cbActual: uint32
    grbit: uint32
    ibLongValue: uint32
    itagSequence: uint32
    columnidNextTagged: uint32
    err: int32
struct JET_RETRIEVECOLUMN
{
    uint columnid;
    void* pvData;
    uint cbData;
    uint cbActual;
    uint grbit;
    uint ibLongValue;
    uint itagSequence;
    uint columnidNextTagged;
    int err;
}

HSP用 定義

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

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

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