ホーム › Media.Audio › acmDriverClose
acmDriverClose
関数開いているACMドライバーインスタンスを閉じて関連リソースを解放する。
シグネチャ
// MSACM32.dll
#include <windows.h>
DWORD acmDriverClose(
HACMDRIVER had,
DWORD fdwClose
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| had | HACMDRIVER | in |
| fdwClose | DWORD | in |
戻り値の型: DWORD
各言語での呼び出し定義
// MSACM32.dll
#include <windows.h>
DWORD acmDriverClose(
HACMDRIVER had,
DWORD fdwClose
);[DllImport("MSACM32.dll", ExactSpelling = true)]
static extern uint acmDriverClose(
IntPtr had, // HACMDRIVER
uint fdwClose // DWORD
);<DllImport("MSACM32.dll", ExactSpelling:=True)>
Public Shared Function acmDriverClose(
had As IntPtr, ' HACMDRIVER
fdwClose As UInteger ' DWORD
) As UInteger
End Function' had : HACMDRIVER
' fdwClose : DWORD
Declare PtrSafe Function acmDriverClose Lib "msacm32" ( _
ByVal had As LongPtr, _
ByVal fdwClose As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
acmDriverClose = ctypes.windll.msacm32.acmDriverClose
acmDriverClose.restype = wintypes.DWORD
acmDriverClose.argtypes = [
wintypes.HANDLE, # had : HACMDRIVER
wintypes.DWORD, # fdwClose : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSACM32.dll')
acmDriverClose = Fiddle::Function.new(
lib['acmDriverClose'],
[
Fiddle::TYPE_VOIDP, # had : HACMDRIVER
-Fiddle::TYPE_INT, # fdwClose : DWORD
],
-Fiddle::TYPE_INT)#[link(name = "msacm32")]
extern "system" {
fn acmDriverClose(
had: *mut core::ffi::c_void, // HACMDRIVER
fdwClose: u32 // DWORD
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSACM32.dll")]
public static extern uint acmDriverClose(IntPtr had, uint fdwClose);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSACM32_acmDriverClose' -Namespace Win32 -PassThru
# $api::acmDriverClose(had, fdwClose)#uselib "MSACM32.dll"
#func global acmDriverClose "acmDriverClose" sptr, sptr
; acmDriverClose had, fdwClose ; 戻り値は stat
; had : HACMDRIVER -> "sptr"
; fdwClose : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSACM32.dll"
#cfunc global acmDriverClose "acmDriverClose" sptr, int
; res = acmDriverClose(had, fdwClose)
; had : HACMDRIVER -> "sptr"
; fdwClose : DWORD -> "int"; DWORD acmDriverClose(HACMDRIVER had, DWORD fdwClose)
#uselib "MSACM32.dll"
#cfunc global acmDriverClose "acmDriverClose" intptr, int
; res = acmDriverClose(had, fdwClose)
; had : HACMDRIVER -> "intptr"
; fdwClose : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msacm32 = windows.NewLazySystemDLL("MSACM32.dll")
procacmDriverClose = msacm32.NewProc("acmDriverClose")
)
// had (HACMDRIVER), fdwClose (DWORD)
r1, _, err := procacmDriverClose.Call(
uintptr(had),
uintptr(fdwClose),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction acmDriverClose(
had: THandle; // HACMDRIVER
fdwClose: DWORD // DWORD
): DWORD; stdcall;
external 'MSACM32.dll' name 'acmDriverClose';result := DllCall("MSACM32\acmDriverClose"
, "Ptr", had ; HACMDRIVER
, "UInt", fdwClose ; DWORD
, "UInt") ; return: DWORD●acmDriverClose(had, fdwClose) = DLL("MSACM32.dll", "dword acmDriverClose(void*, dword)")
# 呼び出し: acmDriverClose(had, fdwClose)
# had : HACMDRIVER -> "void*"
# fdwClose : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。