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

acmGetVersion

関数
インストール済みACM(オーディオ圧縮マネージャー)のバージョンを取得する。
DLLMSACM32.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// MSACM32.dll
#include <windows.h>

DWORD acmGetVersion(void);

パラメーターなし。戻り値: DWORD

各言語での呼び出し定義

// MSACM32.dll
#include <windows.h>

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

acmGetVersion = ctypes.windll.msacm32.acmGetVersion
acmGetVersion.restype = wintypes.DWORD
acmGetVersion.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSACM32.dll')
acmGetVersion = Fiddle::Function.new(
  lib['acmGetVersion'],
  [],
  -Fiddle::TYPE_INT)
#[link(name = "msacm32")]
extern "system" {
    fn acmGetVersion() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSACM32.dll")]
public static extern uint acmGetVersion();
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSACM32_acmGetVersion' -Namespace Win32 -PassThru
# $api::acmGetVersion()
#uselib "MSACM32.dll"
#func global acmGetVersion "acmGetVersion"
; acmGetVersion   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSACM32.dll"
#cfunc global acmGetVersion "acmGetVersion"
; res = acmGetVersion()
; DWORD acmGetVersion()
#uselib "MSACM32.dll"
#cfunc global acmGetVersion "acmGetVersion"
; res = acmGetVersion()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msacm32 = windows.NewLazySystemDLL("MSACM32.dll")
	procacmGetVersion = msacm32.NewProc("acmGetVersion")
)

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