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

CSV_NAMESPACE_INFO

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

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

フィールド

フィールドサイズx64x86説明
VersionDWORD4+0+0この構造体のバージョン番号。
DeviceNumberDWORD4+4+4対象ボリュームのデバイス番号。
StartingOffsetLONGLONG8+8+8ボリュームの開始オフセット(バイト)。
SectorSizeDWORD4+16+16ボリュームのセクタサイズ(バイト)。

各言語での定義

#include <windows.h>

// CSV_NAMESPACE_INFO  (x64 24 / x86 24 バイト)
typedef struct CSV_NAMESPACE_INFO {
    DWORD Version;
    DWORD DeviceNumber;
    LONGLONG StartingOffset;
    DWORD SectorSize;
} CSV_NAMESPACE_INFO;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CSV_NAMESPACE_INFO
{
    public uint Version;
    public uint DeviceNumber;
    public long StartingOffset;
    public uint SectorSize;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CSV_NAMESPACE_INFO
    Public Version As UInteger
    Public DeviceNumber As UInteger
    Public StartingOffset As Long
    Public SectorSize As UInteger
End Structure
import ctypes
from ctypes import wintypes

class CSV_NAMESPACE_INFO(ctypes.Structure):
    _fields_ = [
        ("Version", wintypes.DWORD),
        ("DeviceNumber", wintypes.DWORD),
        ("StartingOffset", ctypes.c_longlong),
        ("SectorSize", wintypes.DWORD),
    ]
#[repr(C)]
pub struct CSV_NAMESPACE_INFO {
    pub Version: u32,
    pub DeviceNumber: u32,
    pub StartingOffset: i64,
    pub SectorSize: u32,
}
import "golang.org/x/sys/windows"

type CSV_NAMESPACE_INFO struct {
	Version uint32
	DeviceNumber uint32
	StartingOffset int64
	SectorSize uint32
}
type
  CSV_NAMESPACE_INFO = record
    Version: DWORD;
    DeviceNumber: DWORD;
    StartingOffset: Int64;
    SectorSize: DWORD;
  end;
const CSV_NAMESPACE_INFO = extern struct {
    Version: u32,
    DeviceNumber: u32,
    StartingOffset: i64,
    SectorSize: u32,
};
type
  CSV_NAMESPACE_INFO {.bycopy.} = object
    Version: uint32
    DeviceNumber: uint32
    StartingOffset: int64
    SectorSize: uint32
struct CSV_NAMESPACE_INFO
{
    uint Version;
    uint DeviceNumber;
    long StartingOffset;
    uint SectorSize;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CSV_NAMESPACE_INFO サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Version : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; DeviceNumber : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; StartingOffset : LONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SectorSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CSV_NAMESPACE_INFO
    #field int Version
    #field int DeviceNumber
    #field int64 StartingOffset
    #field int SectorSize
#endstruct

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