ホーム › Media.DirectShow › DVD_PLAYBACK_LOCATION
DVD_PLAYBACK_LOCATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| TitleNum | DWORD | 4 | +0 | +0 | 現在のタイトル番号を示す。 |
| ChapterNum | DWORD | 4 | +4 | +4 | 現在のチャプター(またはプログラム)番号を示す。 |
| TimeCode | DWORD | 4 | +8 | +8 | 現在の再生位置をBCD形式のタイムコードで示す。 |
各言語での定義
#include <windows.h>
// DVD_PLAYBACK_LOCATION (x64 12 / x86 12 バイト)
typedef struct DVD_PLAYBACK_LOCATION {
DWORD TitleNum;
DWORD ChapterNum;
DWORD TimeCode;
} DVD_PLAYBACK_LOCATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_PLAYBACK_LOCATION
{
public uint TitleNum;
public uint ChapterNum;
public uint TimeCode;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_PLAYBACK_LOCATION
Public TitleNum As UInteger
Public ChapterNum As UInteger
Public TimeCode As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DVD_PLAYBACK_LOCATION(ctypes.Structure):
_fields_ = [
("TitleNum", wintypes.DWORD),
("ChapterNum", wintypes.DWORD),
("TimeCode", wintypes.DWORD),
]#[repr(C)]
pub struct DVD_PLAYBACK_LOCATION {
pub TitleNum: u32,
pub ChapterNum: u32,
pub TimeCode: u32,
}import "golang.org/x/sys/windows"
type DVD_PLAYBACK_LOCATION struct {
TitleNum uint32
ChapterNum uint32
TimeCode uint32
}type
DVD_PLAYBACK_LOCATION = record
TitleNum: DWORD;
ChapterNum: DWORD;
TimeCode: DWORD;
end;const DVD_PLAYBACK_LOCATION = extern struct {
TitleNum: u32,
ChapterNum: u32,
TimeCode: u32,
};type
DVD_PLAYBACK_LOCATION {.bycopy.} = object
TitleNum: uint32
ChapterNum: uint32
TimeCode: uint32struct DVD_PLAYBACK_LOCATION
{
uint TitleNum;
uint ChapterNum;
uint TimeCode;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_PLAYBACK_LOCATION サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; TitleNum : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ChapterNum : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; TimeCode : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DVD_PLAYBACK_LOCATION
#field int TitleNum
#field int ChapterNum
#field int TimeCode
#endstruct
stdim st, DVD_PLAYBACK_LOCATION ; NSTRUCT 変数を確保
st->TitleNum = 100
mes "TitleNum=" + st->TitleNum