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

acmFormatChooseW

関数
波形フォーマット選択ダイアログを表示する。Unicode版。
DLLMSACM32.dll文字セットUnicode (-W)呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// MSACM32.dll  (Unicode / -W)
#include <windows.h>

DWORD acmFormatChooseW(
    ACMFORMATCHOOSEW* pafmtc
);

パラメーター

名前方向
pafmtcACMFORMATCHOOSEW*inout

戻り値の型: DWORD

各言語での呼び出し定義

// MSACM32.dll  (Unicode / -W)
#include <windows.h>

DWORD acmFormatChooseW(
    ACMFORMATCHOOSEW* pafmtc
);
[DllImport("MSACM32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint acmFormatChooseW(
    IntPtr pafmtc   // ACMFORMATCHOOSEW* in/out
);
<DllImport("MSACM32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function acmFormatChooseW(
    pafmtc As IntPtr   ' ACMFORMATCHOOSEW* in/out
) As UInteger
End Function
' pafmtc : ACMFORMATCHOOSEW* in/out
Declare PtrSafe Function acmFormatChooseW Lib "msacm32" ( _
    ByVal pafmtc As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

acmFormatChooseW = ctypes.windll.msacm32.acmFormatChooseW
acmFormatChooseW.restype = wintypes.DWORD
acmFormatChooseW.argtypes = [
    ctypes.c_void_p,  # pafmtc : ACMFORMATCHOOSEW* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSACM32.dll')
acmFormatChooseW = Fiddle::Function.new(
  lib['acmFormatChooseW'],
  [
    Fiddle::TYPE_VOIDP,  # pafmtc : ACMFORMATCHOOSEW* in/out
  ],
  -Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "msacm32")]
extern "system" {
    fn acmFormatChooseW(
        pafmtc: *mut ACMFORMATCHOOSEW  // ACMFORMATCHOOSEW* in/out
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSACM32.dll", CharSet = CharSet.Unicode)]
public static extern uint acmFormatChooseW(IntPtr pafmtc);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSACM32_acmFormatChooseW' -Namespace Win32 -PassThru
# $api::acmFormatChooseW(pafmtc)
#uselib "MSACM32.dll"
#func global acmFormatChooseW "acmFormatChooseW" wptr
; acmFormatChooseW varptr(pafmtc)   ; 戻り値は stat
; pafmtc : ACMFORMATCHOOSEW* in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "MSACM32.dll"
#cfunc global acmFormatChooseW "acmFormatChooseW" var
; res = acmFormatChooseW(pafmtc)
; pafmtc : ACMFORMATCHOOSEW* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD acmFormatChooseW(ACMFORMATCHOOSEW* pafmtc)
#uselib "MSACM32.dll"
#cfunc global acmFormatChooseW "acmFormatChooseW" var
; res = acmFormatChooseW(pafmtc)
; pafmtc : ACMFORMATCHOOSEW* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msacm32 = windows.NewLazySystemDLL("MSACM32.dll")
	procacmFormatChooseW = msacm32.NewProc("acmFormatChooseW")
)

// pafmtc (ACMFORMATCHOOSEW* in/out)
r1, _, err := procacmFormatChooseW.Call(
	uintptr(pafmtc),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function acmFormatChooseW(
  pafmtc: Pointer   // ACMFORMATCHOOSEW* in/out
): DWORD; stdcall;
  external 'MSACM32.dll' name 'acmFormatChooseW';
result := DllCall("MSACM32\acmFormatChooseW"
    , "Ptr", pafmtc   ; ACMFORMATCHOOSEW* in/out
    , "UInt")   ; return: DWORD
●acmFormatChooseW(pafmtc) = DLL("MSACM32.dll", "dword acmFormatChooseW(void*)")
# 呼び出し: acmFormatChooseW(pafmtc)
# pafmtc : ACMFORMATCHOOSEW* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。