Win32 API 日本語リファレンス
ホームSystem.Ioctl › CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT

CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT

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

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

フィールド

フィールドサイズx64x86説明
VetoedFromAltitudeIntegralULONGLONG8+0+0ダイレクトI/Oを拒否したフィルタの高度値の整数部。
VetoedFromAltitudeDecimalULONGLONG8+8+8ダイレクトI/Oを拒否したフィルタの高度値の小数部。
ReasonWCHAR512+16+16ダイレクトI/O拒否の理由を表すWCHAR配列。

各言語での定義

#include <windows.h>

// CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT  (x64 528 / x86 528 バイト)
typedef struct CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT {
    ULONGLONG VetoedFromAltitudeIntegral;
    ULONGLONG VetoedFromAltitudeDecimal;
    WCHAR Reason[256];
} CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT
{
    public ulong VetoedFromAltitudeIntegral;
    public ulong VetoedFromAltitudeDecimal;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Reason;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT
    Public VetoedFromAltitudeIntegral As ULong
    Public VetoedFromAltitudeDecimal As ULong
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public Reason As String
End Structure
import ctypes
from ctypes import wintypes

class CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT(ctypes.Structure):
    _fields_ = [
        ("VetoedFromAltitudeIntegral", ctypes.c_ulonglong),
        ("VetoedFromAltitudeDecimal", ctypes.c_ulonglong),
        ("Reason", ctypes.c_wchar * 256),
    ]
#[repr(C)]
pub struct CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT {
    pub VetoedFromAltitudeIntegral: u64,
    pub VetoedFromAltitudeDecimal: u64,
    pub Reason: [u16; 256],
}
import "golang.org/x/sys/windows"

type CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT struct {
	VetoedFromAltitudeIntegral uint64
	VetoedFromAltitudeDecimal uint64
	Reason [256]uint16
}
type
  CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT = record
    VetoedFromAltitudeIntegral: UInt64;
    VetoedFromAltitudeDecimal: UInt64;
    Reason: array[0..255] of WideChar;
  end;
const CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT = extern struct {
    VetoedFromAltitudeIntegral: u64,
    VetoedFromAltitudeDecimal: u64,
    Reason: [256]u16,
};
type
  CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT {.bycopy.} = object
    VetoedFromAltitudeIntegral: uint64
    VetoedFromAltitudeDecimal: uint64
    Reason: array[256, uint16]
struct CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT
{
    ulong VetoedFromAltitudeIntegral;
    ulong VetoedFromAltitudeDecimal;
    wchar[256] Reason;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT サイズ: 528 バイト(x64)
dim st, 132    ; 4byte整数×132(構造体サイズ 528 / 4 切り上げ)
; VetoedFromAltitudeIntegral : ULONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; VetoedFromAltitudeDecimal : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Reason : WCHAR (+16, 512byte)  varptr(st)+16 を基点に操作(512byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT
    #field int64 VetoedFromAltitudeIntegral
    #field int64 VetoedFromAltitudeDecimal
    #field wchar Reason 256
#endstruct

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