Win32 API 日本語リファレンス
ホームMedia.Multimedia › MCI_DGV_LIST_PARMSA

MCI_DGV_LIST_PARMSA

構造体
サイズx64: 36 バイト / x86: 24 バイトパッキング1

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

フィールド

フィールドサイズx64x86説明
dwCallbackUINT_PTR8/4+0+0完了通知用のコールバック情報。下位ワードに通知先ウィンドウハンドルを格納する。
lpstrReturnLPSTR8/4+8+4一覧結果を受け取るANSIバッファへのポインタ。
dwLengthDWORD4+16+8lpstrReturnバッファの長さ。文字数(バイト)で指定する。
dwNumberDWORD4+20+12取得する項目の序数。何番目の項目かを示す。
dwItemDWORD4+24+16列挙する項目の種別を示す定数。
lpstrAlgorithmLPSTR8/4+28+20対象とするアルゴリズム名へのANSIポインタ。

各言語での定義

#include <windows.h>

// MCI_DGV_LIST_PARMSA  (x64 36 / x86 24 バイト)
#pragma pack(push, 1)
typedef struct MCI_DGV_LIST_PARMSA {
    UINT_PTR dwCallback;
    LPSTR lpstrReturn;
    DWORD dwLength;
    DWORD dwNumber;
    DWORD dwItem;
    LPSTR lpstrAlgorithm;
} MCI_DGV_LIST_PARMSA;
#pragma pack(pop)
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct MCI_DGV_LIST_PARMSA
{
    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_PARMSA
    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 Structure
import ctypes
from ctypes import wintypes

class MCI_DGV_LIST_PARMSA(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_PARMSA {
    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_PARMSA struct {
	dwCallback uintptr
	lpstrReturn uintptr
	dwLength uint32
	dwNumber uint32
	dwItem uint32
	lpstrAlgorithm uintptr
}
type
  MCI_DGV_LIST_PARMSA = packed record
    dwCallback: NativeUInt;
    lpstrReturn: Pointer;
    dwLength: DWORD;
    dwNumber: DWORD;
    dwItem: DWORD;
    lpstrAlgorithm: Pointer;
  end;
const MCI_DGV_LIST_PARMSA = extern struct {
    dwCallback: usize,
    lpstrReturn: ?*anyopaque,
    dwLength: u32,
    dwNumber: u32,
    dwItem: u32,
    lpstrAlgorithm: ?*anyopaque,
};
type
  MCI_DGV_LIST_PARMSA {.packed.} = object
    dwCallback: uint
    lpstrReturn: pointer
    dwLength: uint32
    dwNumber: uint32
    dwItem: uint32
    lpstrAlgorithm: pointer
align(1)
struct MCI_DGV_LIST_PARMSA
{
    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_PARMSA サイズ: 24 バイト(x86)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwCallback : UINT_PTR (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; lpstrReturn : LPSTR (+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 : LPSTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MCI_DGV_LIST_PARMSA サイズ: 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 : LPSTR (+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 : LPSTR (+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_PARMSA, 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_PARMSA        ; NSTRUCT 変数を確保
st->dwCallback = 100
mes "dwCallback=" + st->dwCallback