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