ホーム › Media.MediaFoundation › MFTUnregisterLocal
MFTUnregisterLocal
関数プロセスローカルに登録したMFT変換器を解除する。
シグネチャ
// MFPlat.dll
#include <windows.h>
HRESULT MFTUnregisterLocal(
IClassFactory* pClassFactory // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pClassFactory | IClassFactory* | inoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// MFPlat.dll
#include <windows.h>
HRESULT MFTUnregisterLocal(
IClassFactory* pClassFactory // optional
);[DllImport("MFPlat.dll", ExactSpelling = true)]
static extern int MFTUnregisterLocal(
IntPtr pClassFactory // IClassFactory* optional
);<DllImport("MFPlat.dll", ExactSpelling:=True)>
Public Shared Function MFTUnregisterLocal(
pClassFactory As IntPtr ' IClassFactory* optional
) As Integer
End Function' pClassFactory : IClassFactory* optional
Declare PtrSafe Function MFTUnregisterLocal Lib "mfplat" ( _
ByVal pClassFactory As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MFTUnregisterLocal = ctypes.windll.mfplat.MFTUnregisterLocal
MFTUnregisterLocal.restype = ctypes.c_int
MFTUnregisterLocal.argtypes = [
ctypes.c_void_p, # pClassFactory : IClassFactory* optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MFPlat.dll')
MFTUnregisterLocal = Fiddle::Function.new(
lib['MFTUnregisterLocal'],
[
Fiddle::TYPE_VOIDP, # pClassFactory : IClassFactory* optional
],
Fiddle::TYPE_INT)#[link(name = "mfplat")]
extern "system" {
fn MFTUnregisterLocal(
pClassFactory: *mut core::ffi::c_void // IClassFactory* optional
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MFPlat.dll")]
public static extern int MFTUnregisterLocal(IntPtr pClassFactory);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MFPlat_MFTUnregisterLocal' -Namespace Win32 -PassThru
# $api::MFTUnregisterLocal(pClassFactory)#uselib "MFPlat.dll"
#func global MFTUnregisterLocal "MFTUnregisterLocal" sptr
; MFTUnregisterLocal pClassFactory ; 戻り値は stat
; pClassFactory : IClassFactory* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MFPlat.dll"
#cfunc global MFTUnregisterLocal "MFTUnregisterLocal" sptr
; res = MFTUnregisterLocal(pClassFactory)
; pClassFactory : IClassFactory* optional -> "sptr"; HRESULT MFTUnregisterLocal(IClassFactory* pClassFactory)
#uselib "MFPlat.dll"
#cfunc global MFTUnregisterLocal "MFTUnregisterLocal" intptr
; res = MFTUnregisterLocal(pClassFactory)
; pClassFactory : IClassFactory* optional -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mfplat = windows.NewLazySystemDLL("MFPlat.dll")
procMFTUnregisterLocal = mfplat.NewProc("MFTUnregisterLocal")
)
// pClassFactory (IClassFactory* optional)
r1, _, err := procMFTUnregisterLocal.Call(
uintptr(pClassFactory),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction MFTUnregisterLocal(
pClassFactory: Pointer // IClassFactory* optional
): Integer; stdcall;
external 'MFPlat.dll' name 'MFTUnregisterLocal';result := DllCall("MFPlat\MFTUnregisterLocal"
, "Ptr", pClassFactory ; IClassFactory* optional
, "Int") ; return: HRESULT●MFTUnregisterLocal(pClassFactory) = DLL("MFPlat.dll", "int MFTUnregisterLocal(void*)")
# 呼び出し: MFTUnregisterLocal(pClassFactory)
# pClassFactory : IClassFactory* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。