ホーム › Media.Audio › MIXERLINECONTROLSW
MIXERLINECONTROLSW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。呼び出し前に設定する。 |
| dwLineID | DWORD | 4 | +4 | +4 | コントロールを取得する対象ラインのID。 |
| Anonymous | _Anonymous_e__Union | 4 | +8 | +8 | コントロールID/種別を指定する無名共用体(取得方法を切り替える)。 |
| cControls | DWORD | 4 | +12 | +12 | 取得するコントロールの数。 |
| cbmxctrl | DWORD | 4 | +16 | +16 | 1つのMIXERCONTROL構造体のバイトサイズ。 |
| pamxctrl | MIXERCONTROLW* | 8/4 | +20 | +20 | コントロール情報を受け取るMIXERCONTROLW配列へのポインタ。 |
共用体: _Anonymous_e__Union x64 4B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| dwControlID | DWORD | 4 | +0 | +0 |
| dwControlType | DWORD | 4 | +0 | +0 |
各言語での定義
#include <windows.h>
// MIXERLINECONTROLSW (x64 28 / x86 24 バイト)
#pragma pack(push, 1)
typedef struct MIXERLINECONTROLSW {
DWORD cbStruct;
DWORD dwLineID;
_Anonymous_e__Union Anonymous;
DWORD cControls;
DWORD cbmxctrl;
MIXERCONTROLW* pamxctrl;
} MIXERLINECONTROLSW;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct MIXERLINECONTROLSW
{
public uint cbStruct;
public uint dwLineID;
public _Anonymous_e__Union Anonymous;
public uint cControls;
public uint cbmxctrl;
public IntPtr pamxctrl;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure MIXERLINECONTROLSW
Public cbStruct As UInteger
Public dwLineID As UInteger
Public Anonymous As _Anonymous_e__Union
Public cControls As UInteger
Public cbmxctrl As UInteger
Public pamxctrl As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class MIXERLINECONTROLSW(ctypes.Structure):
_pack_ = 1
_fields_ = [
("cbStruct", wintypes.DWORD),
("dwLineID", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
("cControls", wintypes.DWORD),
("cbmxctrl", wintypes.DWORD),
("pamxctrl", ctypes.c_void_p),
]#[repr(C, packed(1))]
pub struct MIXERLINECONTROLSW {
pub cbStruct: u32,
pub dwLineID: u32,
pub Anonymous: _Anonymous_e__Union,
pub cControls: u32,
pub cbmxctrl: u32,
pub pamxctrl: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type MIXERLINECONTROLSW struct {
cbStruct uint32
dwLineID uint32
Anonymous _Anonymous_e__Union
cControls uint32
cbmxctrl uint32
pamxctrl uintptr
}type
MIXERLINECONTROLSW = packed record
cbStruct: DWORD;
dwLineID: DWORD;
Anonymous: _Anonymous_e__Union;
cControls: DWORD;
cbmxctrl: DWORD;
pamxctrl: Pointer;
end;const MIXERLINECONTROLSW = extern struct {
cbStruct: u32,
dwLineID: u32,
Anonymous: _Anonymous_e__Union,
cControls: u32,
cbmxctrl: u32,
pamxctrl: ?*anyopaque,
};type
MIXERLINECONTROLSW {.packed.} = object
cbStruct: uint32
dwLineID: uint32
Anonymous: _Anonymous_e__Union
cControls: uint32
cbmxctrl: uint32
pamxctrl: pointeralign(1)
struct MIXERLINECONTROLSW
{
uint cbStruct;
uint dwLineID;
_Anonymous_e__Union Anonymous;
uint cControls;
uint cbmxctrl;
void* pamxctrl;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MIXERLINECONTROLSW サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwLineID : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; cControls : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; cbmxctrl : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pamxctrl : MIXERCONTROLW* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MIXERLINECONTROLSW サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwLineID : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; cControls : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; cbmxctrl : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pamxctrl : MIXERCONTROLW* (+20, 8byte) varptr(st)+20 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MIXERLINECONTROLSW, pack=1
#field int cbStruct
#field int dwLineID
#field byte Anonymous 4
#field int cControls
#field int cbmxctrl
#field intptr pamxctrl
#endstruct
stdim st, MIXERLINECONTROLSW ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。