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