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