ホーム › Media.MediaPlayer › WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC
WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwCurrentTransactionID | DWORD | 4 | +0 | +0 | デバイス側の現在のトランザクションID。 |
| dwReturnedObjectCount | DWORD | 4 | +4 | +4 | 返却されたオブジェクトの数。 |
| dwUnretrievedObjectCount | DWORD | 4 | +8 | +8 | 未取得のまま残っているオブジェクトの数。 |
| dwDeletedObjectStartingOffset | DWORD | 4 | +12 | +12 | 削除オブジェクトリストの開始オフセット。 |
| dwFlags | DWORD | 4 | +16 | +16 | メタデータラウンドトリップの属性を示すビットフラグ。 |
| wsObjectPathnameList | WCHAR | 2 | +20 | +20 | オブジェクトパス名のリストを保持するワイド文字配列。 |
各言語での定義
#include <windows.h>
// WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC (x64 22 / x86 22 バイト)
#pragma pack(push, 1)
typedef struct WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC {
DWORD dwCurrentTransactionID;
DWORD dwReturnedObjectCount;
DWORD dwUnretrievedObjectCount;
DWORD dwDeletedObjectStartingOffset;
DWORD dwFlags;
WCHAR wsObjectPathnameList[1];
} WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC
{
public uint dwCurrentTransactionID;
public uint dwReturnedObjectCount;
public uint dwUnretrievedObjectCount;
public uint dwDeletedObjectStartingOffset;
public uint dwFlags;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)] public string wsObjectPathnameList;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC
Public dwCurrentTransactionID As UInteger
Public dwReturnedObjectCount As UInteger
Public dwUnretrievedObjectCount As UInteger
Public dwDeletedObjectStartingOffset As UInteger
Public dwFlags As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=1)> Public wsObjectPathnameList As String
End Structureimport ctypes
from ctypes import wintypes
class WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwCurrentTransactionID", wintypes.DWORD),
("dwReturnedObjectCount", wintypes.DWORD),
("dwUnretrievedObjectCount", wintypes.DWORD),
("dwDeletedObjectStartingOffset", wintypes.DWORD),
("dwFlags", wintypes.DWORD),
("wsObjectPathnameList", ctypes.c_wchar * 1),
]#[repr(C, packed(1))]
pub struct WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC {
pub dwCurrentTransactionID: u32,
pub dwReturnedObjectCount: u32,
pub dwUnretrievedObjectCount: u32,
pub dwDeletedObjectStartingOffset: u32,
pub dwFlags: u32,
pub wsObjectPathnameList: [u16; 1],
}import "golang.org/x/sys/windows"
type WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC struct {
dwCurrentTransactionID uint32
dwReturnedObjectCount uint32
dwUnretrievedObjectCount uint32
dwDeletedObjectStartingOffset uint32
dwFlags uint32
wsObjectPathnameList [1]uint16
}type
WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC = packed record
dwCurrentTransactionID: DWORD;
dwReturnedObjectCount: DWORD;
dwUnretrievedObjectCount: DWORD;
dwDeletedObjectStartingOffset: DWORD;
dwFlags: DWORD;
wsObjectPathnameList: array[0..0] of WideChar;
end;const WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC = extern struct {
dwCurrentTransactionID: u32,
dwReturnedObjectCount: u32,
dwUnretrievedObjectCount: u32,
dwDeletedObjectStartingOffset: u32,
dwFlags: u32,
wsObjectPathnameList: [1]u16,
};type
WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC {.packed.} = object
dwCurrentTransactionID: uint32
dwReturnedObjectCount: uint32
dwUnretrievedObjectCount: uint32
dwDeletedObjectStartingOffset: uint32
dwFlags: uint32
wsObjectPathnameList: array[1, uint16]align(1)
struct WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC
{
uint dwCurrentTransactionID;
uint dwReturnedObjectCount;
uint dwUnretrievedObjectCount;
uint dwDeletedObjectStartingOffset;
uint dwFlags;
wchar[1] wsObjectPathnameList;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC サイズ: 22 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 22 / 4 切り上げ)
; dwCurrentTransactionID : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwReturnedObjectCount : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwUnretrievedObjectCount : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwDeletedObjectStartingOffset : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; wsObjectPathnameList : WCHAR (+20, 2byte) varptr(st)+20 を基点に操作(2byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC, pack=1
#field int dwCurrentTransactionID
#field int dwReturnedObjectCount
#field int dwUnretrievedObjectCount
#field int dwDeletedObjectStartingOffset
#field int dwFlags
#field wchar wsObjectPathnameList 1
#endstruct
stdim st, WMP_WMDM_METADATA_ROUND_TRIP_DEVICE2PC ; NSTRUCT 変数を確保
st->dwCurrentTransactionID = 100
mes "dwCurrentTransactionID=" + st->dwCurrentTransactionID