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