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