ホーム › Media.Multimedia › MCI_DGV_LIST_PARMSW
MCI_DGV_LIST_PARMSW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwCallback | UINT_PTR | 8/4 | +0 | +0 | 下位ワードには、MCI_NOTIFY フラグで使用されるウィンドウハンドルを指定します。 |
| lpstrReturn | LPWSTR | 8/4 | +8 | +4 | 戻り文字列を格納するバッファーです。 |
| dwLength | DWORD | 4 | +16 | +8 | バッファーの長さ (バイト単位)。 |
| dwNumber | DWORD | 4 | +20 | +12 | リスト内の項目のインデックスです。 |
| dwItem | DWORD | 4 | +24 | +16 | リスト項目の種類です。 |
| lpstrAlgorithm | LPWSTR | 8/4 | +28 | +20 | アルゴリズム名を格納する文字列です。 |
公式ドキュメント
MCI_DGV_LIST_PARMS 構造体は、デジタルビデオデバイス向けの MCI_LIST コマンドの情報を格納します。
解説(Remarks)
この構造体のメンバーにデータを割り当てるときは、mciSendCommand 関数の fdwCommand パラメーターに対応するフラグを設定して、メンバーを有効にしてください。
メモ
digitalv.h ヘッダーは、UNICODE プリプロセッサ定数の定義に応じて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして MCI_DGV_LIST_PARMS を定義しています。エンコーディングに依存しないエイリアスと、エンコーディングに依存するコードを混在させると、不一致が生じてコンパイルエラーや実行時エラーの原因となることがあります。詳細については、「Conventions for Function Prototypes」を参照してください。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// MCI_DGV_LIST_PARMSW (x64 36 / x86 24 バイト)
#pragma pack(push, 1)
typedef struct MCI_DGV_LIST_PARMSW {
UINT_PTR dwCallback;
LPWSTR lpstrReturn;
DWORD dwLength;
DWORD dwNumber;
DWORD dwItem;
LPWSTR lpstrAlgorithm;
} MCI_DGV_LIST_PARMSW;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct MCI_DGV_LIST_PARMSW
{
public UIntPtr dwCallback;
public IntPtr lpstrReturn;
public uint dwLength;
public uint dwNumber;
public uint dwItem;
public IntPtr lpstrAlgorithm;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure MCI_DGV_LIST_PARMSW
Public dwCallback As UIntPtr
Public lpstrReturn As IntPtr
Public dwLength As UInteger
Public dwNumber As UInteger
Public dwItem As UInteger
Public lpstrAlgorithm As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class MCI_DGV_LIST_PARMSW(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwCallback", ctypes.c_size_t),
("lpstrReturn", ctypes.c_void_p),
("dwLength", wintypes.DWORD),
("dwNumber", wintypes.DWORD),
("dwItem", wintypes.DWORD),
("lpstrAlgorithm", ctypes.c_void_p),
]#[repr(C, packed(1))]
pub struct MCI_DGV_LIST_PARMSW {
pub dwCallback: usize,
pub lpstrReturn: *mut core::ffi::c_void,
pub dwLength: u32,
pub dwNumber: u32,
pub dwItem: u32,
pub lpstrAlgorithm: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type MCI_DGV_LIST_PARMSW struct {
dwCallback uintptr
lpstrReturn uintptr
dwLength uint32
dwNumber uint32
dwItem uint32
lpstrAlgorithm uintptr
}type
MCI_DGV_LIST_PARMSW = packed record
dwCallback: NativeUInt;
lpstrReturn: Pointer;
dwLength: DWORD;
dwNumber: DWORD;
dwItem: DWORD;
lpstrAlgorithm: Pointer;
end;const MCI_DGV_LIST_PARMSW = extern struct {
dwCallback: usize,
lpstrReturn: ?*anyopaque,
dwLength: u32,
dwNumber: u32,
dwItem: u32,
lpstrAlgorithm: ?*anyopaque,
};type
MCI_DGV_LIST_PARMSW {.packed.} = object
dwCallback: uint
lpstrReturn: pointer
dwLength: uint32
dwNumber: uint32
dwItem: uint32
lpstrAlgorithm: pointeralign(1)
struct MCI_DGV_LIST_PARMSW
{
size_t dwCallback;
void* lpstrReturn;
uint dwLength;
uint dwNumber;
uint dwItem;
void* lpstrAlgorithm;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MCI_DGV_LIST_PARMSW サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwCallback : UINT_PTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpstrReturn : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwNumber : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwItem : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpstrAlgorithm : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MCI_DGV_LIST_PARMSW サイズ: 36 バイト(x64)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; dwCallback : UINT_PTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; lpstrReturn : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; dwLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwNumber : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwItem : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; lpstrAlgorithm : LPWSTR (+28, 8byte) qpoke st,28,値 / qpeek(st,28) ※IronHSPのみ。3.7/3.8は lpoke st,28,下位 : lpoke st,32,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MCI_DGV_LIST_PARMSW, pack=1
#field intptr dwCallback
#field intptr lpstrReturn
#field int dwLength
#field int dwNumber
#field int dwItem
#field intptr lpstrAlgorithm
#endstruct
stdim st, MCI_DGV_LIST_PARMSW ; NSTRUCT 変数を確保
st->dwCallback = 100
mes "dwCallback=" + st->dwCallback