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