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

MFIsFormatYUV

関数
指定した形式がYUV系かどうかを判定する。
DLLEVR.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

BOOL MFIsFormatYUV(
    DWORD Format
);

パラメーター

名前方向
FormatDWORDin

戻り値の型: BOOL

各言語での呼び出し定義

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

BOOL MFIsFormatYUV(
    DWORD Format
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("EVR.dll", ExactSpelling = true)]
static extern bool MFIsFormatYUV(
    uint Format   // DWORD
);
<DllImport("EVR.dll", ExactSpelling:=True)>
Public Shared Function MFIsFormatYUV(
    Format As UInteger   ' DWORD
) As Boolean
End Function
' Format : DWORD
Declare PtrSafe Function MFIsFormatYUV Lib "evr" ( _
    ByVal Format As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MFIsFormatYUV = ctypes.windll.evr.MFIsFormatYUV
MFIsFormatYUV.restype = wintypes.BOOL
MFIsFormatYUV.argtypes = [
    wintypes.DWORD,  # Format : DWORD
]
require 'fiddle'
require 'fiddle/import'

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

var (
	evr = windows.NewLazySystemDLL("EVR.dll")
	procMFIsFormatYUV = evr.NewProc("MFIsFormatYUV")
)

// Format (DWORD)
r1, _, err := procMFIsFormatYUV.Call(
	uintptr(Format),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function MFIsFormatYUV(
  Format: DWORD   // DWORD
): BOOL; stdcall;
  external 'EVR.dll' name 'MFIsFormatYUV';
result := DllCall("EVR\MFIsFormatYUV"
    , "UInt", Format   ; DWORD
    , "Int")   ; return: BOOL
●MFIsFormatYUV(Format) = DLL("EVR.dll", "bool MFIsFormatYUV(dword)")
# 呼び出し: MFIsFormatYUV(Format)
# Format : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。