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

mixerClose

関数
オーディオミキサーデバイスを閉じる。
DLLWINMM.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

DWORD mixerClose(
    HMIXER hmx
);

パラメーター

名前方向
hmxHMIXERin

戻り値の型: DWORD

各言語での呼び出し定義

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

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

mixerClose = ctypes.windll.winmm.mixerClose
mixerClose.restype = wintypes.DWORD
mixerClose.argtypes = [
    wintypes.HANDLE,  # hmx : HMIXER
]
require 'fiddle'
require 'fiddle/import'

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

var (
	winmm = windows.NewLazySystemDLL("WINMM.dll")
	procmixerClose = winmm.NewProc("mixerClose")
)

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