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

MFShutdown

関数
Media Foundationプラットフォームを終了して解放する。
DLLMFPlat.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

HRESULT MFShutdown(void);

パラメーターなし。戻り値: HRESULT

各言語での呼び出し定義

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

HRESULT MFShutdown(void);
[DllImport("MFPlat.dll", ExactSpelling = true)]
static extern int MFShutdown();
<DllImport("MFPlat.dll", ExactSpelling:=True)>
Public Shared Function MFShutdown() As Integer
End Function
Declare PtrSafe Function MFShutdown Lib "mfplat" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MFShutdown = ctypes.windll.mfplat.MFShutdown
MFShutdown.restype = ctypes.c_int
MFShutdown.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MFPlat.dll')
MFShutdown = Fiddle::Function.new(
  lib['MFShutdown'],
  [],
  Fiddle::TYPE_INT)
#[link(name = "mfplat")]
extern "system" {
    fn MFShutdown() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MFPlat.dll")]
public static extern int MFShutdown();
"@
$api = Add-Type -MemberDefinition $sig -Name 'MFPlat_MFShutdown' -Namespace Win32 -PassThru
# $api::MFShutdown()
#uselib "MFPlat.dll"
#func global MFShutdown "MFShutdown"
; MFShutdown   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MFPlat.dll"
#cfunc global MFShutdown "MFShutdown"
; res = MFShutdown()
; HRESULT MFShutdown()
#uselib "MFPlat.dll"
#cfunc global MFShutdown "MFShutdown"
; res = MFShutdown()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	mfplat = windows.NewLazySystemDLL("MFPlat.dll")
	procMFShutdown = mfplat.NewProc("MFShutdown")
)

r1, _, err := procMFShutdown.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function MFShutdown: Integer; stdcall;
  external 'MFPlat.dll' name 'MFShutdown';
result := DllCall("MFPlat\MFShutdown", "Int")
●MFShutdown() = DLL("MFPlat.dll", "int MFShutdown()")
# 呼び出し: MFShutdown()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。