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

acmFormatChooseA

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

シグネチャ

// MSACM32.dll  (ANSI / -A)
#include <windows.h>

DWORD acmFormatChooseA(
    ACMFORMATCHOOSEA* pafmtc
);

パラメーター

名前方向
pafmtcACMFORMATCHOOSEA*inout

戻り値の型: DWORD

各言語での呼び出し定義

// MSACM32.dll  (ANSI / -A)
#include <windows.h>

DWORD acmFormatChooseA(
    ACMFORMATCHOOSEA* pafmtc
);
[DllImport("MSACM32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern uint acmFormatChooseA(
    IntPtr pafmtc   // ACMFORMATCHOOSEA* in/out
);
<DllImport("MSACM32.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function acmFormatChooseA(
    pafmtc As IntPtr   ' ACMFORMATCHOOSEA* in/out
) As UInteger
End Function
' pafmtc : ACMFORMATCHOOSEA* in/out
Declare PtrSafe Function acmFormatChooseA Lib "msacm32" ( _
    ByVal pafmtc As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

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

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

var (
	msacm32 = windows.NewLazySystemDLL("MSACM32.dll")
	procacmFormatChooseA = msacm32.NewProc("acmFormatChooseA")
)

// pafmtc (ACMFORMATCHOOSEA* in/out)
r1, _, err := procacmFormatChooseA.Call(
	uintptr(pafmtc),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function acmFormatChooseA(
  pafmtc: Pointer   // ACMFORMATCHOOSEA* in/out
): DWORD; stdcall;
  external 'MSACM32.dll' name 'acmFormatChooseA';
result := DllCall("MSACM32\acmFormatChooseA"
    , "Ptr", pafmtc   ; ACMFORMATCHOOSEA* in/out
    , "UInt")   ; return: DWORD
●acmFormatChooseA(pafmtc) = DLL("MSACM32.dll", "dword acmFormatChooseA(void*)")
# 呼び出し: acmFormatChooseA(pafmtc)
# pafmtc : ACMFORMATCHOOSEA* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。