ホーム › Media.Audio › ACMDRIVERDETAILSW
ACMDRIVERDETAILSW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStruct | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。呼び出し前に設定する。 |
| fccType | DWORD | 4 | +4 | +4 | ドライバの種類を示すFOURCC(通常'audc')。 |
| fccComp | DWORD | 4 | +8 | +8 | 圧縮コンポーネントのサブタイプを示すFOURCC。通常0。 |
| wMid | WORD | 2 | +12 | +12 | ドライバ製造元(メーカー)ID。 |
| wPid | WORD | 2 | +14 | +14 | ドライバ製品ID。 |
| vdwACM | DWORD | 4 | +16 | +16 | ドライバが対応するACMバージョン。 |
| vdwDriver | DWORD | 4 | +20 | +20 | ドライバ自身のバージョン。 |
| fdwSupport | DWORD | 4 | +24 | +24 | サポートする変換機能を示すビットフラグ(ACMDRIVERDETAILS_SUPPORTF_*)。 |
| cFormatTags | DWORD | 4 | +28 | +28 | サポートするフォーマットタグの数。 |
| cFilterTags | DWORD | 4 | +32 | +32 | サポートするフィルタタグの数。 |
| hicon | HICON | 8/4 | +36 | +36 | ドライバを表すアイコンのハンドル。 |
| szShortName | WCHAR | 64 | +44 | +40 | ドライバの短い名前(Unicode、固定長配列)。 |
| szLongName | WCHAR | 256 | +108 | +104 | ドライバの完全名(Unicode、固定長配列)。 |
| szCopyright | WCHAR | 160 | +364 | +360 | 著作権文字列(Unicode、固定長配列)。 |
| szLicensing | WCHAR | 256 | +524 | +520 | ライセンス情報文字列(Unicode、固定長配列)。 |
| szFeatures | WCHAR | 1024 | +780 | +776 | 機能の説明文字列(Unicode、固定長配列)。 |
各言語での定義
#include <windows.h>
// ACMDRIVERDETAILSW (x64 1804 / x86 1800 バイト)
#pragma pack(push, 1)
typedef struct ACMDRIVERDETAILSW {
DWORD cbStruct;
DWORD fccType;
DWORD fccComp;
WORD wMid;
WORD wPid;
DWORD vdwACM;
DWORD vdwDriver;
DWORD fdwSupport;
DWORD cFormatTags;
DWORD cFilterTags;
HICON hicon;
WCHAR szShortName[32];
WCHAR szLongName[128];
WCHAR szCopyright[80];
WCHAR szLicensing[128];
WCHAR szFeatures[512];
} ACMDRIVERDETAILSW;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct ACMDRIVERDETAILSW
{
public uint cbStruct;
public uint fccType;
public uint fccComp;
public ushort wMid;
public ushort wPid;
public uint vdwACM;
public uint vdwDriver;
public uint fdwSupport;
public uint cFormatTags;
public uint cFilterTags;
public IntPtr hicon;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string szShortName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szLongName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szCopyright;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szLicensing;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string szFeatures;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure ACMDRIVERDETAILSW
Public cbStruct As UInteger
Public fccType As UInteger
Public fccComp As UInteger
Public wMid As UShort
Public wPid As UShort
Public vdwACM As UInteger
Public vdwDriver As UInteger
Public fdwSupport As UInteger
Public cFormatTags As UInteger
Public cFilterTags As UInteger
Public hicon As IntPtr
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public szShortName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public szLongName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)> Public szCopyright As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public szLicensing As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=512)> Public szFeatures As String
End Structureimport ctypes
from ctypes import wintypes
class ACMDRIVERDETAILSW(ctypes.Structure):
_pack_ = 1
_fields_ = [
("cbStruct", wintypes.DWORD),
("fccType", wintypes.DWORD),
("fccComp", wintypes.DWORD),
("wMid", ctypes.c_ushort),
("wPid", ctypes.c_ushort),
("vdwACM", wintypes.DWORD),
("vdwDriver", wintypes.DWORD),
("fdwSupport", wintypes.DWORD),
("cFormatTags", wintypes.DWORD),
("cFilterTags", wintypes.DWORD),
("hicon", ctypes.c_void_p),
("szShortName", ctypes.c_wchar * 32),
("szLongName", ctypes.c_wchar * 128),
("szCopyright", ctypes.c_wchar * 80),
("szLicensing", ctypes.c_wchar * 128),
("szFeatures", ctypes.c_wchar * 512),
]#[repr(C, packed(1))]
pub struct ACMDRIVERDETAILSW {
pub cbStruct: u32,
pub fccType: u32,
pub fccComp: u32,
pub wMid: u16,
pub wPid: u16,
pub vdwACM: u32,
pub vdwDriver: u32,
pub fdwSupport: u32,
pub cFormatTags: u32,
pub cFilterTags: u32,
pub hicon: *mut core::ffi::c_void,
pub szShortName: [u16; 32],
pub szLongName: [u16; 128],
pub szCopyright: [u16; 80],
pub szLicensing: [u16; 128],
pub szFeatures: [u16; 512],
}import "golang.org/x/sys/windows"
type ACMDRIVERDETAILSW struct {
cbStruct uint32
fccType uint32
fccComp uint32
wMid uint16
wPid uint16
vdwACM uint32
vdwDriver uint32
fdwSupport uint32
cFormatTags uint32
cFilterTags uint32
hicon uintptr
szShortName [32]uint16
szLongName [128]uint16
szCopyright [80]uint16
szLicensing [128]uint16
szFeatures [512]uint16
}type
ACMDRIVERDETAILSW = packed record
cbStruct: DWORD;
fccType: DWORD;
fccComp: DWORD;
wMid: Word;
wPid: Word;
vdwACM: DWORD;
vdwDriver: DWORD;
fdwSupport: DWORD;
cFormatTags: DWORD;
cFilterTags: DWORD;
hicon: Pointer;
szShortName: array[0..31] of WideChar;
szLongName: array[0..127] of WideChar;
szCopyright: array[0..79] of WideChar;
szLicensing: array[0..127] of WideChar;
szFeatures: array[0..511] of WideChar;
end;const ACMDRIVERDETAILSW = extern struct {
cbStruct: u32,
fccType: u32,
fccComp: u32,
wMid: u16,
wPid: u16,
vdwACM: u32,
vdwDriver: u32,
fdwSupport: u32,
cFormatTags: u32,
cFilterTags: u32,
hicon: ?*anyopaque,
szShortName: [32]u16,
szLongName: [128]u16,
szCopyright: [80]u16,
szLicensing: [128]u16,
szFeatures: [512]u16,
};type
ACMDRIVERDETAILSW {.packed.} = object
cbStruct: uint32
fccType: uint32
fccComp: uint32
wMid: uint16
wPid: uint16
vdwACM: uint32
vdwDriver: uint32
fdwSupport: uint32
cFormatTags: uint32
cFilterTags: uint32
hicon: pointer
szShortName: array[32, uint16]
szLongName: array[128, uint16]
szCopyright: array[80, uint16]
szLicensing: array[128, uint16]
szFeatures: array[512, uint16]align(1)
struct ACMDRIVERDETAILSW
{
uint cbStruct;
uint fccType;
uint fccComp;
ushort wMid;
ushort wPid;
uint vdwACM;
uint vdwDriver;
uint fdwSupport;
uint cFormatTags;
uint cFilterTags;
void* hicon;
wchar[32] szShortName;
wchar[128] szLongName;
wchar[80] szCopyright;
wchar[128] szLicensing;
wchar[512] szFeatures;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ACMDRIVERDETAILSW サイズ: 1800 バイト(x86)
dim st, 450 ; 4byte整数×450(構造体サイズ 1800 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fccType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fccComp : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; wMid : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; wPid : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; vdwACM : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; vdwDriver : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; fdwSupport : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cFormatTags : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; cFilterTags : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; hicon : HICON (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; szShortName : WCHAR (+40, 64byte) varptr(st)+40 を基点に操作(64byte:入れ子/配列)
; szLongName : WCHAR (+104, 256byte) varptr(st)+104 を基点に操作(256byte:入れ子/配列)
; szCopyright : WCHAR (+360, 160byte) varptr(st)+360 を基点に操作(160byte:入れ子/配列)
; szLicensing : WCHAR (+520, 256byte) varptr(st)+520 を基点に操作(256byte:入れ子/配列)
; szFeatures : WCHAR (+776, 1024byte) varptr(st)+776 を基点に操作(1024byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ACMDRIVERDETAILSW サイズ: 1804 バイト(x64)
dim st, 451 ; 4byte整数×451(構造体サイズ 1804 / 4 切り上げ)
; cbStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fccType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fccComp : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; wMid : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; wPid : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; vdwACM : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; vdwDriver : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; fdwSupport : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cFormatTags : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; cFilterTags : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; hicon : HICON (+36, 8byte) qpoke st,36,値 / qpeek(st,36) ※IronHSPのみ。3.7/3.8は lpoke st,36,下位 : lpoke st,40,上位
; szShortName : WCHAR (+44, 64byte) varptr(st)+44 を基点に操作(64byte:入れ子/配列)
; szLongName : WCHAR (+108, 256byte) varptr(st)+108 を基点に操作(256byte:入れ子/配列)
; szCopyright : WCHAR (+364, 160byte) varptr(st)+364 を基点に操作(160byte:入れ子/配列)
; szLicensing : WCHAR (+524, 256byte) varptr(st)+524 を基点に操作(256byte:入れ子/配列)
; szFeatures : WCHAR (+780, 1024byte) varptr(st)+780 を基点に操作(1024byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ACMDRIVERDETAILSW, pack=1
#field int cbStruct
#field int fccType
#field int fccComp
#field short wMid
#field short wPid
#field int vdwACM
#field int vdwDriver
#field int fdwSupport
#field int cFormatTags
#field int cFilterTags
#field intptr hicon
#field wchar szShortName 32
#field wchar szLongName 128
#field wchar szCopyright 80
#field wchar szLicensing 128
#field wchar szFeatures 512
#endstruct
stdim st, ACMDRIVERDETAILSW ; NSTRUCT 変数を確保
st->cbStruct = 100
mes "cbStruct=" + st->cbStruct