Win32 API 日本語リファレンス
ホームDevices.Dvd › DVD_BCA_DESCRIPTOR

DVD_BCA_DESCRIPTOR

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

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

フィールド

フィールドサイズx64x86説明
BCAInformationBYTE1+0+0BCA(Burst Cutting Area)情報を保持するバイト配列。

各言語での定義

#include <windows.h>

// DVD_BCA_DESCRIPTOR  (x64 1 / x86 1 バイト)
typedef struct DVD_BCA_DESCRIPTOR {
    BYTE BCAInformation[1];
} DVD_BCA_DESCRIPTOR;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_BCA_DESCRIPTOR
{
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] BCAInformation;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_BCA_DESCRIPTOR
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public BCAInformation() As Byte
End Structure
import ctypes
from ctypes import wintypes

class DVD_BCA_DESCRIPTOR(ctypes.Structure):
    _fields_ = [
        ("BCAInformation", ctypes.c_ubyte * 1),
    ]
#[repr(C)]
pub struct DVD_BCA_DESCRIPTOR {
    pub BCAInformation: [u8; 1],
}
import "golang.org/x/sys/windows"

type DVD_BCA_DESCRIPTOR struct {
	BCAInformation [1]byte
}
type
  DVD_BCA_DESCRIPTOR = record
    BCAInformation: array[0..0] of Byte;
  end;
const DVD_BCA_DESCRIPTOR = extern struct {
    BCAInformation: [1]u8,
};
type
  DVD_BCA_DESCRIPTOR {.bycopy.} = object
    BCAInformation: array[1, uint8]
struct DVD_BCA_DESCRIPTOR
{
    ubyte[1] BCAInformation;
}

HSP用 定義

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

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

stdim st, DVD_BCA_DESCRIPTOR        ; NSTRUCT 変数を確保