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