ホーム › Media.Multimedia › AVIStreamGetFrameClose
AVIStreamGetFrameClose
関数フレーム取得用オブジェクトを解放する。
シグネチャ
// AVIFIL32.dll
#include <windows.h>
HRESULT AVIStreamGetFrameClose(
IGetFrame* pg
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| pg | IGetFrame* | in | AVIStreamGetFrameOpen 関数から返されたハンドル。この関数を呼び出した後、ハンドルは無効になります。 |
戻り値の型: HRESULT
公式ドキュメント
AVIStreamGetFrameClose 関数は、ビデオフレームの展開に使用したリソースを解放します。
戻り値
成功した場合は 0 を返し、それ以外の場合はエラーを返します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// AVIFIL32.dll
#include <windows.h>
HRESULT AVIStreamGetFrameClose(
IGetFrame* pg
);[DllImport("AVIFIL32.dll", ExactSpelling = true)]
static extern int AVIStreamGetFrameClose(
IntPtr pg // IGetFrame*
);<DllImport("AVIFIL32.dll", ExactSpelling:=True)>
Public Shared Function AVIStreamGetFrameClose(
pg As IntPtr ' IGetFrame*
) As Integer
End Function' pg : IGetFrame*
Declare PtrSafe Function AVIStreamGetFrameClose Lib "avifil32" ( _
ByVal pg As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
AVIStreamGetFrameClose = ctypes.windll.avifil32.AVIStreamGetFrameClose
AVIStreamGetFrameClose.restype = ctypes.c_int
AVIStreamGetFrameClose.argtypes = [
ctypes.c_void_p, # pg : IGetFrame*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('AVIFIL32.dll')
AVIStreamGetFrameClose = Fiddle::Function.new(
lib['AVIStreamGetFrameClose'],
[
Fiddle::TYPE_VOIDP, # pg : IGetFrame*
],
Fiddle::TYPE_INT)#[link(name = "avifil32")]
extern "system" {
fn AVIStreamGetFrameClose(
pg: *mut core::ffi::c_void // IGetFrame*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("AVIFIL32.dll")]
public static extern int AVIStreamGetFrameClose(IntPtr pg);
"@
$api = Add-Type -MemberDefinition $sig -Name 'AVIFIL32_AVIStreamGetFrameClose' -Namespace Win32 -PassThru
# $api::AVIStreamGetFrameClose(pg)#uselib "AVIFIL32.dll"
#func global AVIStreamGetFrameClose "AVIStreamGetFrameClose" sptr
; AVIStreamGetFrameClose pg ; 戻り値は stat
; pg : IGetFrame* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "AVIFIL32.dll"
#cfunc global AVIStreamGetFrameClose "AVIStreamGetFrameClose" sptr
; res = AVIStreamGetFrameClose(pg)
; pg : IGetFrame* -> "sptr"; HRESULT AVIStreamGetFrameClose(IGetFrame* pg)
#uselib "AVIFIL32.dll"
#cfunc global AVIStreamGetFrameClose "AVIStreamGetFrameClose" intptr
; res = AVIStreamGetFrameClose(pg)
; pg : IGetFrame* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
avifil32 = windows.NewLazySystemDLL("AVIFIL32.dll")
procAVIStreamGetFrameClose = avifil32.NewProc("AVIStreamGetFrameClose")
)
// pg (IGetFrame*)
r1, _, err := procAVIStreamGetFrameClose.Call(
uintptr(pg),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction AVIStreamGetFrameClose(
pg: Pointer // IGetFrame*
): Integer; stdcall;
external 'AVIFIL32.dll' name 'AVIStreamGetFrameClose';result := DllCall("AVIFIL32\AVIStreamGetFrameClose"
, "Ptr", pg ; IGetFrame*
, "Int") ; return: HRESULT●AVIStreamGetFrameClose(pg) = DLL("AVIFIL32.dll", "int AVIStreamGetFrameClose(void*)")
# 呼び出し: AVIStreamGetFrameClose(pg)
# pg : IGetFrame* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "avifil32" fn AVIStreamGetFrameClose(
pg: ?*anyopaque // IGetFrame*
) callconv(std.os.windows.WINAPI) i32;proc AVIStreamGetFrameClose(
pg: pointer # IGetFrame*
): int32 {.importc: "AVIStreamGetFrameClose", stdcall, dynlib: "AVIFIL32.dll".}pragma(lib, "avifil32");
extern(Windows)
int AVIStreamGetFrameClose(
void* pg // IGetFrame*
);ccall((:AVIStreamGetFrameClose, "AVIFIL32.dll"), stdcall, Int32,
(Ptr{Cvoid},),
pg)
# pg : IGetFrame* -> Ptr{Cvoid}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t AVIStreamGetFrameClose(
void* pg);
]]
local avifil32 = ffi.load("avifil32")
-- avifil32.AVIStreamGetFrameClose(pg)
-- pg : IGetFrame*
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('AVIFIL32.dll');
const AVIStreamGetFrameClose = lib.func('__stdcall', 'AVIStreamGetFrameClose', 'int32_t', ['void *']);
// AVIStreamGetFrameClose(pg)
// pg : IGetFrame* -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("AVIFIL32.dll", {
AVIStreamGetFrameClose: { parameters: ["pointer"], result: "i32" },
});
// lib.symbols.AVIStreamGetFrameClose(pg)
// pg : IGetFrame* -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t AVIStreamGetFrameClose(
void* pg);
C, "AVIFIL32.dll");
// $ffi->AVIStreamGetFrameClose(pg);
// pg : IGetFrame*
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Avifil32 extends StdCallLibrary {
Avifil32 INSTANCE = Native.load("avifil32", Avifil32.class);
int AVIStreamGetFrameClose(
Pointer pg // IGetFrame*
);
}@[Link("avifil32")]
lib LibAVIFIL32
fun AVIStreamGetFrameClose = AVIStreamGetFrameClose(
pg : Void* # IGetFrame*
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef AVIStreamGetFrameCloseNative = Int32 Function(Pointer<Void>);
typedef AVIStreamGetFrameCloseDart = int Function(Pointer<Void>);
final AVIStreamGetFrameClose = DynamicLibrary.open('AVIFIL32.dll')
.lookupFunction<AVIStreamGetFrameCloseNative, AVIStreamGetFrameCloseDart>('AVIStreamGetFrameClose');
// pg : IGetFrame* -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function AVIStreamGetFrameClose(
pg: Pointer // IGetFrame*
): Integer; stdcall;
external 'AVIFIL32.dll' name 'AVIStreamGetFrameClose';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "AVIStreamGetFrameClose"
c_AVIStreamGetFrameClose :: Ptr () -> IO Int32
-- pg : IGetFrame* -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let avistreamgetframeclose =
foreign "AVIStreamGetFrameClose"
((ptr void) @-> returning int32_t)
(* pg : IGetFrame* -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library avifil32 (t "AVIFIL32.dll"))
(cffi:use-foreign-library avifil32)
(cffi:defcfun ("AVIStreamGetFrameClose" avistream-get-frame-close :convention :stdcall) :int32
(pg :pointer)) ; IGetFrame*
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $AVIStreamGetFrameClose = Win32::API::More->new('AVIFIL32',
'int AVIStreamGetFrameClose(LPVOID pg)');
# my $ret = $AVIStreamGetFrameClose->Call($pg);
# pg : IGetFrame* -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
使用する型