ホーム › Storage.Jet › JET_SETCOLUMN
JET_SETCOLUMN
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| columnid | DWORD | 4 | +0 | +0 | 値を設定する対象列の識別子。 |
| pvData | void* | 8/4 | +8 | +4 | 設定する値データへのポインタ。NULLでNULL値を設定。 |
| cbData | DWORD | 4 | +16 | +8 | pvDataが指すデータのバイト長。 |
| grbit | DWORD | 4 | +20 | +12 | 設定動作を制御するフラグ群(追記、ゼロ長等)。 |
| ibLongValue | DWORD | 4 | +24 | +16 | ロング値内で設定を開始するバイトオフセット。 |
| itagSequence | DWORD | 4 | +28 | +20 | 多値列で設定する値の序数(1始まり)。 |
| err | INT | 4 | +32 | +24 | この列設定の結果を示すJETエラーコード(出力)。 |
各言語での定義
#include <windows.h>
// JET_SETCOLUMN (x64 40 / x86 28 バイト)
typedef struct JET_SETCOLUMN {
DWORD columnid;
void* pvData;
DWORD cbData;
DWORD grbit;
DWORD ibLongValue;
DWORD itagSequence;
INT err;
} JET_SETCOLUMN;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JET_SETCOLUMN
{
public uint columnid;
public IntPtr pvData;
public uint cbData;
public uint grbit;
public uint ibLongValue;
public uint itagSequence;
public int err;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JET_SETCOLUMN
Public columnid As UInteger
Public pvData As IntPtr
Public cbData As UInteger
Public grbit As UInteger
Public ibLongValue As UInteger
Public itagSequence As UInteger
Public err As Integer
End Structureimport ctypes
from ctypes import wintypes
class JET_SETCOLUMN(ctypes.Structure):
_fields_ = [
("columnid", wintypes.DWORD),
("pvData", ctypes.c_void_p),
("cbData", wintypes.DWORD),
("grbit", wintypes.DWORD),
("ibLongValue", wintypes.DWORD),
("itagSequence", wintypes.DWORD),
("err", ctypes.c_int),
]#[repr(C)]
pub struct JET_SETCOLUMN {
pub columnid: u32,
pub pvData: *mut core::ffi::c_void,
pub cbData: u32,
pub grbit: u32,
pub ibLongValue: u32,
pub itagSequence: u32,
pub err: i32,
}import "golang.org/x/sys/windows"
type JET_SETCOLUMN struct {
columnid uint32
pvData uintptr
cbData uint32
grbit uint32
ibLongValue uint32
itagSequence uint32
err int32
}type
JET_SETCOLUMN = record
columnid: DWORD;
pvData: Pointer;
cbData: DWORD;
grbit: DWORD;
ibLongValue: DWORD;
itagSequence: DWORD;
err: Integer;
end;const JET_SETCOLUMN = extern struct {
columnid: u32,
pvData: ?*anyopaque,
cbData: u32,
grbit: u32,
ibLongValue: u32,
itagSequence: u32,
err: i32,
};type
JET_SETCOLUMN {.bycopy.} = object
columnid: uint32
pvData: pointer
cbData: uint32
grbit: uint32
ibLongValue: uint32
itagSequence: uint32
err: int32struct JET_SETCOLUMN
{
uint columnid;
void* pvData;
uint cbData;
uint grbit;
uint ibLongValue;
uint itagSequence;
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_SETCOLUMN サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 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 も可)
; grbit : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ibLongValue : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; itagSequence : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; err : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JET_SETCOLUMN サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 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 も可)
; grbit : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ibLongValue : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; itagSequence : 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 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JET_SETCOLUMN
#field int columnid
#field intptr pvData
#field int cbData
#field int grbit
#field int ibLongValue
#field int itagSequence
#field int err
#endstruct
stdim st, JET_SETCOLUMN ; NSTRUCT 変数を確保
st->columnid = 100
mes "columnid=" + st->columnid