ホーム › Devices.Dvd › DVD_PRERECORDED_INFORMATION
DVD_PRERECORDED_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| FieldID_1 | BYTE | 1 | +0 | +0 | プリレコード情報フィールド1の識別子バイト。 |
| DiscApplicationCode | BYTE | 1 | +1 | +1 | ディスクアプリケーションコードを示すバイト配列。 |
| DiscPhysicalCode | BYTE | 1 | +2 | +2 | ディスク物理コードを示すバイト配列。 |
| LastAddressOfDataRecordableArea | BYTE | 3 | +3 | +3 | 記録可能データ領域の最終アドレスを示すバイト配列。 |
| _bitfield | BYTE | 1 | +6 | +6 | 拡張パーツバージョン等を格納するビットフィールド。 |
| Reserved0 | BYTE | 1 | +7 | +7 | 予約領域。将来の拡張用で通常は0。 |
| FieldID_2 | BYTE | 1 | +8 | +8 | プリレコード情報フィールド2の識別子バイト。 |
| OpcSuggestedCode | BYTE | 1 | +9 | +9 | 推奨OPC(最適パワー制御)コードを示すバイト配列。 |
| WavelengthCode | BYTE | 1 | +10 | +10 | 推奨記録波長コードを示すバイト配列。 |
| WriteStrategyCode | BYTE | 4 | +11 | +11 | 書き込みストラテジコードを示すバイト配列。 |
| Reserved2 | BYTE | 1 | +15 | +15 | 予約領域。将来の拡張用で通常は0。 |
| FieldID_3 | BYTE | 1 | +16 | +16 | プリレコード情報フィールド3の識別子バイト。 |
| ManufacturerId_3 | BYTE | 6 | +17 | +17 | 製造者ID(フィールド3)を示すバイト配列。 |
| Reserved3 | BYTE | 1 | +23 | +23 | 予約領域。将来の拡張用で通常は0。 |
| FieldID_4 | BYTE | 1 | +24 | +24 | プリレコード情報フィールド4の識別子バイト。 |
| ManufacturerId_4 | BYTE | 6 | +25 | +25 | 製造者ID(フィールド4)を示すバイト配列。 |
| Reserved4 | BYTE | 1 | +31 | +31 | 予約領域。将来の拡張用で通常は0。 |
| FieldID_5 | BYTE | 1 | +32 | +32 | プリレコード情報フィールド5の識別子バイト。 |
| ManufacturerId_5 | BYTE | 6 | +33 | +33 | 製造者ID(フィールド5)を示すバイト配列。 |
| Reserved5 | BYTE | 1 | +39 | +39 | 予約領域。将来の拡張用で通常は0。 |
| Reserved99 | BYTE | 24 | +40 | +40 | 末尾の予約領域。将来の拡張用で通常は0。 |
各言語での定義
#include <windows.h>
// DVD_PRERECORDED_INFORMATION (x64 64 / x86 64 バイト)
typedef struct DVD_PRERECORDED_INFORMATION {
BYTE FieldID_1;
BYTE DiscApplicationCode;
BYTE DiscPhysicalCode;
BYTE LastAddressOfDataRecordableArea[3];
BYTE _bitfield;
BYTE Reserved0;
BYTE FieldID_2;
BYTE OpcSuggestedCode;
BYTE WavelengthCode;
BYTE WriteStrategyCode[4];
BYTE Reserved2;
BYTE FieldID_3;
BYTE ManufacturerId_3[6];
BYTE Reserved3;
BYTE FieldID_4;
BYTE ManufacturerId_4[6];
BYTE Reserved4;
BYTE FieldID_5;
BYTE ManufacturerId_5[6];
BYTE Reserved5;
BYTE Reserved99[24];
} DVD_PRERECORDED_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_PRERECORDED_INFORMATION
{
public byte FieldID_1;
public byte DiscApplicationCode;
public byte DiscPhysicalCode;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] LastAddressOfDataRecordableArea;
public byte _bitfield;
public byte Reserved0;
public byte FieldID_2;
public byte OpcSuggestedCode;
public byte WavelengthCode;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] WriteStrategyCode;
public byte Reserved2;
public byte FieldID_3;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] ManufacturerId_3;
public byte Reserved3;
public byte FieldID_4;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] ManufacturerId_4;
public byte Reserved4;
public byte FieldID_5;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] ManufacturerId_5;
public byte Reserved5;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] public byte[] Reserved99;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_PRERECORDED_INFORMATION
Public FieldID_1 As Byte
Public DiscApplicationCode As Byte
Public DiscPhysicalCode As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=3)> Public LastAddressOfDataRecordableArea() As Byte
Public _bitfield As Byte
Public Reserved0 As Byte
Public FieldID_2 As Byte
Public OpcSuggestedCode As Byte
Public WavelengthCode As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=4)> Public WriteStrategyCode() As Byte
Public Reserved2 As Byte
Public FieldID_3 As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=6)> Public ManufacturerId_3() As Byte
Public Reserved3 As Byte
Public FieldID_4 As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=6)> Public ManufacturerId_4() As Byte
Public Reserved4 As Byte
Public FieldID_5 As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=6)> Public ManufacturerId_5() As Byte
Public Reserved5 As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=24)> Public Reserved99() As Byte
End Structureimport ctypes
from ctypes import wintypes
class DVD_PRERECORDED_INFORMATION(ctypes.Structure):
_fields_ = [
("FieldID_1", ctypes.c_ubyte),
("DiscApplicationCode", ctypes.c_ubyte),
("DiscPhysicalCode", ctypes.c_ubyte),
("LastAddressOfDataRecordableArea", ctypes.c_ubyte * 3),
("_bitfield", ctypes.c_ubyte),
("Reserved0", ctypes.c_ubyte),
("FieldID_2", ctypes.c_ubyte),
("OpcSuggestedCode", ctypes.c_ubyte),
("WavelengthCode", ctypes.c_ubyte),
("WriteStrategyCode", ctypes.c_ubyte * 4),
("Reserved2", ctypes.c_ubyte),
("FieldID_3", ctypes.c_ubyte),
("ManufacturerId_3", ctypes.c_ubyte * 6),
("Reserved3", ctypes.c_ubyte),
("FieldID_4", ctypes.c_ubyte),
("ManufacturerId_4", ctypes.c_ubyte * 6),
("Reserved4", ctypes.c_ubyte),
("FieldID_5", ctypes.c_ubyte),
("ManufacturerId_5", ctypes.c_ubyte * 6),
("Reserved5", ctypes.c_ubyte),
("Reserved99", ctypes.c_ubyte * 24),
]#[repr(C)]
pub struct DVD_PRERECORDED_INFORMATION {
pub FieldID_1: u8,
pub DiscApplicationCode: u8,
pub DiscPhysicalCode: u8,
pub LastAddressOfDataRecordableArea: [u8; 3],
pub _bitfield: u8,
pub Reserved0: u8,
pub FieldID_2: u8,
pub OpcSuggestedCode: u8,
pub WavelengthCode: u8,
pub WriteStrategyCode: [u8; 4],
pub Reserved2: u8,
pub FieldID_3: u8,
pub ManufacturerId_3: [u8; 6],
pub Reserved3: u8,
pub FieldID_4: u8,
pub ManufacturerId_4: [u8; 6],
pub Reserved4: u8,
pub FieldID_5: u8,
pub ManufacturerId_5: [u8; 6],
pub Reserved5: u8,
pub Reserved99: [u8; 24],
}import "golang.org/x/sys/windows"
type DVD_PRERECORDED_INFORMATION struct {
FieldID_1 byte
DiscApplicationCode byte
DiscPhysicalCode byte
LastAddressOfDataRecordableArea [3]byte
_bitfield byte
Reserved0 byte
FieldID_2 byte
OpcSuggestedCode byte
WavelengthCode byte
WriteStrategyCode [4]byte
Reserved2 byte
FieldID_3 byte
ManufacturerId_3 [6]byte
Reserved3 byte
FieldID_4 byte
ManufacturerId_4 [6]byte
Reserved4 byte
FieldID_5 byte
ManufacturerId_5 [6]byte
Reserved5 byte
Reserved99 [24]byte
}type
DVD_PRERECORDED_INFORMATION = record
FieldID_1: Byte;
DiscApplicationCode: Byte;
DiscPhysicalCode: Byte;
LastAddressOfDataRecordableArea: array[0..2] of Byte;
_bitfield: Byte;
Reserved0: Byte;
FieldID_2: Byte;
OpcSuggestedCode: Byte;
WavelengthCode: Byte;
WriteStrategyCode: array[0..3] of Byte;
Reserved2: Byte;
FieldID_3: Byte;
ManufacturerId_3: array[0..5] of Byte;
Reserved3: Byte;
FieldID_4: Byte;
ManufacturerId_4: array[0..5] of Byte;
Reserved4: Byte;
FieldID_5: Byte;
ManufacturerId_5: array[0..5] of Byte;
Reserved5: Byte;
Reserved99: array[0..23] of Byte;
end;const DVD_PRERECORDED_INFORMATION = extern struct {
FieldID_1: u8,
DiscApplicationCode: u8,
DiscPhysicalCode: u8,
LastAddressOfDataRecordableArea: [3]u8,
_bitfield: u8,
Reserved0: u8,
FieldID_2: u8,
OpcSuggestedCode: u8,
WavelengthCode: u8,
WriteStrategyCode: [4]u8,
Reserved2: u8,
FieldID_3: u8,
ManufacturerId_3: [6]u8,
Reserved3: u8,
FieldID_4: u8,
ManufacturerId_4: [6]u8,
Reserved4: u8,
FieldID_5: u8,
ManufacturerId_5: [6]u8,
Reserved5: u8,
Reserved99: [24]u8,
};type
DVD_PRERECORDED_INFORMATION {.bycopy.} = object
FieldID_1: uint8
DiscApplicationCode: uint8
DiscPhysicalCode: uint8
LastAddressOfDataRecordableArea: array[3, uint8]
_bitfield: uint8
Reserved0: uint8
FieldID_2: uint8
OpcSuggestedCode: uint8
WavelengthCode: uint8
WriteStrategyCode: array[4, uint8]
Reserved2: uint8
FieldID_3: uint8
ManufacturerId_3: array[6, uint8]
Reserved3: uint8
FieldID_4: uint8
ManufacturerId_4: array[6, uint8]
Reserved4: uint8
FieldID_5: uint8
ManufacturerId_5: array[6, uint8]
Reserved5: uint8
Reserved99: array[24, uint8]struct DVD_PRERECORDED_INFORMATION
{
ubyte FieldID_1;
ubyte DiscApplicationCode;
ubyte DiscPhysicalCode;
ubyte[3] LastAddressOfDataRecordableArea;
ubyte _bitfield;
ubyte Reserved0;
ubyte FieldID_2;
ubyte OpcSuggestedCode;
ubyte WavelengthCode;
ubyte[4] WriteStrategyCode;
ubyte Reserved2;
ubyte FieldID_3;
ubyte[6] ManufacturerId_3;
ubyte Reserved3;
ubyte FieldID_4;
ubyte[6] ManufacturerId_4;
ubyte Reserved4;
ubyte FieldID_5;
ubyte[6] ManufacturerId_5;
ubyte Reserved5;
ubyte[24] Reserved99;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_PRERECORDED_INFORMATION サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; FieldID_1 : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; DiscApplicationCode : BYTE (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; DiscPhysicalCode : BYTE (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; LastAddressOfDataRecordableArea : BYTE (+3, 3byte) varptr(st)+3 を基点に操作(3byte:入れ子/配列)
; _bitfield : BYTE (+6, 1byte) poke st,6,値 / 値 = peek(st,6)
; Reserved0 : BYTE (+7, 1byte) poke st,7,値 / 値 = peek(st,7)
; FieldID_2 : BYTE (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; OpcSuggestedCode : BYTE (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; WavelengthCode : BYTE (+10, 1byte) poke st,10,値 / 値 = peek(st,10)
; WriteStrategyCode : BYTE (+11, 4byte) varptr(st)+11 を基点に操作(4byte:入れ子/配列)
; Reserved2 : BYTE (+15, 1byte) poke st,15,値 / 値 = peek(st,15)
; FieldID_3 : BYTE (+16, 1byte) poke st,16,値 / 値 = peek(st,16)
; ManufacturerId_3 : BYTE (+17, 6byte) varptr(st)+17 を基点に操作(6byte:入れ子/配列)
; Reserved3 : BYTE (+23, 1byte) poke st,23,値 / 値 = peek(st,23)
; FieldID_4 : BYTE (+24, 1byte) poke st,24,値 / 値 = peek(st,24)
; ManufacturerId_4 : BYTE (+25, 6byte) varptr(st)+25 を基点に操作(6byte:入れ子/配列)
; Reserved4 : BYTE (+31, 1byte) poke st,31,値 / 値 = peek(st,31)
; FieldID_5 : BYTE (+32, 1byte) poke st,32,値 / 値 = peek(st,32)
; ManufacturerId_5 : BYTE (+33, 6byte) varptr(st)+33 を基点に操作(6byte:入れ子/配列)
; Reserved5 : BYTE (+39, 1byte) poke st,39,値 / 値 = peek(st,39)
; Reserved99 : BYTE (+40, 24byte) varptr(st)+40 を基点に操作(24byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DVD_PRERECORDED_INFORMATION
#field byte FieldID_1
#field byte DiscApplicationCode
#field byte DiscPhysicalCode
#field byte LastAddressOfDataRecordableArea 3
#field byte _bitfield
#field byte Reserved0
#field byte FieldID_2
#field byte OpcSuggestedCode
#field byte WavelengthCode
#field byte WriteStrategyCode 4
#field byte Reserved2
#field byte FieldID_3
#field byte ManufacturerId_3 6
#field byte Reserved3
#field byte FieldID_4
#field byte ManufacturerId_4 6
#field byte Reserved4
#field byte FieldID_5
#field byte ManufacturerId_5 6
#field byte Reserved5
#field byte Reserved99 24
#endstruct
stdim st, DVD_PRERECORDED_INFORMATION ; NSTRUCT 変数を確保
st->FieldID_1 = 100
mes "FieldID_1=" + st->FieldID_1