ホーム › System.Ioctl › ASYNC_DUPLICATE_EXTENTS_STATUS
ASYNC_DUPLICATE_EXTENTS_STATUS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | このステータス構造体のバージョン番号。 |
| State | DUPLICATE_EXTENTS_STATE | 4 | +4 | +4 | 非同期複製操作の現在の状態を示す列挙値。 |
| SourceFileOffset | ULONGLONG | 8 | +8 | +8 | ソースファイル内の複製開始オフセット(バイト)。 |
| TargetFileOffset | ULONGLONG | 8 | +16 | +16 | ターゲットファイル内の複製先オフセット(バイト)。 |
| ByteCount | ULONGLONG | 8 | +24 | +24 | 複製する総バイト数。 |
| BytesDuplicated | ULONGLONG | 8 | +32 | +32 | これまでに複製済みのバイト数。 |
各言語での定義
#include <windows.h>
// ASYNC_DUPLICATE_EXTENTS_STATUS (x64 40 / x86 40 バイト)
typedef struct ASYNC_DUPLICATE_EXTENTS_STATUS {
DWORD Version;
DUPLICATE_EXTENTS_STATE State;
ULONGLONG SourceFileOffset;
ULONGLONG TargetFileOffset;
ULONGLONG ByteCount;
ULONGLONG BytesDuplicated;
} ASYNC_DUPLICATE_EXTENTS_STATUS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ASYNC_DUPLICATE_EXTENTS_STATUS
{
public uint Version;
public int State;
public ulong SourceFileOffset;
public ulong TargetFileOffset;
public ulong ByteCount;
public ulong BytesDuplicated;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ASYNC_DUPLICATE_EXTENTS_STATUS
Public Version As UInteger
Public State As Integer
Public SourceFileOffset As ULong
Public TargetFileOffset As ULong
Public ByteCount As ULong
Public BytesDuplicated As ULong
End Structureimport ctypes
from ctypes import wintypes
class ASYNC_DUPLICATE_EXTENTS_STATUS(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("State", ctypes.c_int),
("SourceFileOffset", ctypes.c_ulonglong),
("TargetFileOffset", ctypes.c_ulonglong),
("ByteCount", ctypes.c_ulonglong),
("BytesDuplicated", ctypes.c_ulonglong),
]#[repr(C)]
pub struct ASYNC_DUPLICATE_EXTENTS_STATUS {
pub Version: u32,
pub State: i32,
pub SourceFileOffset: u64,
pub TargetFileOffset: u64,
pub ByteCount: u64,
pub BytesDuplicated: u64,
}import "golang.org/x/sys/windows"
type ASYNC_DUPLICATE_EXTENTS_STATUS struct {
Version uint32
State int32
SourceFileOffset uint64
TargetFileOffset uint64
ByteCount uint64
BytesDuplicated uint64
}type
ASYNC_DUPLICATE_EXTENTS_STATUS = record
Version: DWORD;
State: Integer;
SourceFileOffset: UInt64;
TargetFileOffset: UInt64;
ByteCount: UInt64;
BytesDuplicated: UInt64;
end;const ASYNC_DUPLICATE_EXTENTS_STATUS = extern struct {
Version: u32,
State: i32,
SourceFileOffset: u64,
TargetFileOffset: u64,
ByteCount: u64,
BytesDuplicated: u64,
};type
ASYNC_DUPLICATE_EXTENTS_STATUS {.bycopy.} = object
Version: uint32
State: int32
SourceFileOffset: uint64
TargetFileOffset: uint64
ByteCount: uint64
BytesDuplicated: uint64struct ASYNC_DUPLICATE_EXTENTS_STATUS
{
uint Version;
int State;
ulong SourceFileOffset;
ulong TargetFileOffset;
ulong ByteCount;
ulong BytesDuplicated;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ASYNC_DUPLICATE_EXTENTS_STATUS サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; State : DUPLICATE_EXTENTS_STATE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SourceFileOffset : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; TargetFileOffset : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ByteCount : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; BytesDuplicated : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ASYNC_DUPLICATE_EXTENTS_STATUS
#field int Version
#field int State
#field int64 SourceFileOffset
#field int64 TargetFileOffset
#field int64 ByteCount
#field int64 BytesDuplicated
#endstruct
stdim st, ASYNC_DUPLICATE_EXTENTS_STATUS ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version