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