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

acmStreamReset

関数
ACM変換ストリームを初期状態にリセットし保留中の処理を破棄する。
DLLMSACM32.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

DWORD acmStreamReset(
    HACMSTREAM has,
    DWORD fdwReset
);

パラメーター

名前方向
hasHACMSTREAMin
fdwResetDWORDin

戻り値の型: DWORD

各言語での呼び出し定義

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

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

acmStreamReset = ctypes.windll.msacm32.acmStreamReset
acmStreamReset.restype = wintypes.DWORD
acmStreamReset.argtypes = [
    wintypes.HANDLE,  # has : HACMSTREAM
    wintypes.DWORD,  # fdwReset : DWORD
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msacm32 = windows.NewLazySystemDLL("MSACM32.dll")
	procacmStreamReset = msacm32.NewProc("acmStreamReset")
)

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