ホーム › Devices.Dvd › DVD_DUAL_LAYER_RECORDING_INFORMATION
DVD_DUAL_LAYER_RECORDING_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| _bitfield | BYTE | 1 | +0 | +0 | デュアルレイヤ記録方式(レイヤジャンプ等)を格納するビットフィールド。 |
| Reserved1 | BYTE | 3 | +1 | +1 | 予約領域。将来の拡張用で通常は0。 |
| Layer0Sectors | BYTE | 4 | +4 | +4 | レイヤ0のセクタ数を示すバイト配列。 |
各言語での定義
#include <windows.h>
// DVD_DUAL_LAYER_RECORDING_INFORMATION (x64 8 / x86 8 バイト)
typedef struct DVD_DUAL_LAYER_RECORDING_INFORMATION {
BYTE _bitfield;
BYTE Reserved1[3];
BYTE Layer0Sectors[4];
} DVD_DUAL_LAYER_RECORDING_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_DUAL_LAYER_RECORDING_INFORMATION
{
public byte _bitfield;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] Reserved1;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] Layer0Sectors;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_DUAL_LAYER_RECORDING_INFORMATION
Public _bitfield As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=3)> Public Reserved1() As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=4)> Public Layer0Sectors() As Byte
End Structureimport ctypes
from ctypes import wintypes
class DVD_DUAL_LAYER_RECORDING_INFORMATION(ctypes.Structure):
_fields_ = [
("_bitfield", ctypes.c_ubyte),
("Reserved1", ctypes.c_ubyte * 3),
("Layer0Sectors", ctypes.c_ubyte * 4),
]#[repr(C)]
pub struct DVD_DUAL_LAYER_RECORDING_INFORMATION {
pub _bitfield: u8,
pub Reserved1: [u8; 3],
pub Layer0Sectors: [u8; 4],
}import "golang.org/x/sys/windows"
type DVD_DUAL_LAYER_RECORDING_INFORMATION struct {
_bitfield byte
Reserved1 [3]byte
Layer0Sectors [4]byte
}type
DVD_DUAL_LAYER_RECORDING_INFORMATION = record
_bitfield: Byte;
Reserved1: array[0..2] of Byte;
Layer0Sectors: array[0..3] of Byte;
end;const DVD_DUAL_LAYER_RECORDING_INFORMATION = extern struct {
_bitfield: u8,
Reserved1: [3]u8,
Layer0Sectors: [4]u8,
};type
DVD_DUAL_LAYER_RECORDING_INFORMATION {.bycopy.} = object
_bitfield: uint8
Reserved1: array[3, uint8]
Layer0Sectors: array[4, uint8]struct DVD_DUAL_LAYER_RECORDING_INFORMATION
{
ubyte _bitfield;
ubyte[3] Reserved1;
ubyte[4] Layer0Sectors;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_DUAL_LAYER_RECORDING_INFORMATION サイズ: 8 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 8 / 4 切り上げ)
; _bitfield : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; Reserved1 : BYTE (+1, 3byte) varptr(st)+1 を基点に操作(3byte:入れ子/配列)
; Layer0Sectors : BYTE (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DVD_DUAL_LAYER_RECORDING_INFORMATION
#field byte _bitfield
#field byte Reserved1 3
#field byte Layer0Sectors 4
#endstruct
stdim st, DVD_DUAL_LAYER_RECORDING_INFORMATION ; NSTRUCT 変数を確保
st->_bitfield = 100
mes "_bitfield=" + st->_bitfield