ホーム › System.Search › DBROWWATCHCHANGE
DBROWWATCHCHANGE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| hRegion | UINT_PTR | 8/4 | +0 | +0 | 変更が発生したリージョンのハンドル。 |
| eChangeKind | DWORD | 4 | +8 | +4 | 変更の種類を示す値。挿入・削除・更新等を表す。 |
| hRow | UINT_PTR | 8/4 | +12 | +8 | 変更対象の行ハンドル。 |
| iRow | UINT_PTR | 8/4 | +20 | +12 | リージョン内での行の相対位置(序数)。 |
各言語での定義
#include <windows.h>
// DBROWWATCHCHANGE (x64 28 / x86 16 バイト)
#pragma pack(push, 2)
typedef struct DBROWWATCHCHANGE {
UINT_PTR hRegion;
DWORD eChangeKind;
UINT_PTR hRow;
UINT_PTR iRow;
} DBROWWATCHCHANGE;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 2, CharSet = CharSet.Unicode)]
public struct DBROWWATCHCHANGE
{
public UIntPtr hRegion;
public uint eChangeKind;
public UIntPtr hRow;
public UIntPtr iRow;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=2, CharSet:=CharSet.Unicode)>
Public Structure DBROWWATCHCHANGE
Public hRegion As UIntPtr
Public eChangeKind As UInteger
Public hRow As UIntPtr
Public iRow As UIntPtr
End Structureimport ctypes
from ctypes import wintypes
class DBROWWATCHCHANGE(ctypes.Structure):
_pack_ = 2
_fields_ = [
("hRegion", ctypes.c_size_t),
("eChangeKind", wintypes.DWORD),
("hRow", ctypes.c_size_t),
("iRow", ctypes.c_size_t),
]#[repr(C, packed(2))]
pub struct DBROWWATCHCHANGE {
pub hRegion: usize,
pub eChangeKind: u32,
pub hRow: usize,
pub iRow: usize,
}import "golang.org/x/sys/windows"
type DBROWWATCHCHANGE struct {
hRegion uintptr
eChangeKind uint32
hRow uintptr
iRow uintptr
}type
DBROWWATCHCHANGE = packed record
hRegion: NativeUInt;
eChangeKind: DWORD;
hRow: NativeUInt;
iRow: NativeUInt;
end;const DBROWWATCHCHANGE = extern struct {
hRegion: usize,
eChangeKind: u32,
hRow: usize,
iRow: usize,
};type
DBROWWATCHCHANGE {.packed.} = object
hRegion: uint
eChangeKind: uint32
hRow: uint
iRow: uintalign(2)
struct DBROWWATCHCHANGE
{
size_t hRegion;
uint eChangeKind;
size_t hRow;
size_t iRow;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DBROWWATCHCHANGE サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; hRegion : UINT_PTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; eChangeKind : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; hRow : UINT_PTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; iRow : UINT_PTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DBROWWATCHCHANGE サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; hRegion : UINT_PTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; eChangeKind : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; hRow : UINT_PTR (+12, 8byte) qpoke st,12,値 / qpeek(st,12) ※IronHSPのみ。3.7/3.8は lpoke st,12,下位 : lpoke st,16,上位
; iRow : UINT_PTR (+20, 8byte) qpoke st,20,値 / qpeek(st,20) ※IronHSPのみ。3.7/3.8は lpoke st,20,下位 : lpoke st,24,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DBROWWATCHCHANGE, pack=2
#field intptr hRegion
#field int eChangeKind
#field intptr hRow
#field intptr iRow
#endstruct
stdim st, DBROWWATCHCHANGE ; NSTRUCT 変数を確保
st->hRegion = 100
mes "hRegion=" + st->hRegion