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