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

AVISaveOptionsFree

関数
AVISaveOptionsで確保した圧縮オプション用メモリを解放する。
DLLAVIFIL32.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

HRESULT AVISaveOptionsFree(
    INT nStreams,
    AVICOMPRESSOPTIONS** plpOptions
);

パラメーター

名前方向
nStreamsINTin
plpOptionsAVICOMPRESSOPTIONS**in

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT AVISaveOptionsFree(
    INT nStreams,
    AVICOMPRESSOPTIONS** plpOptions
);
[DllImport("AVIFIL32.dll", ExactSpelling = true)]
static extern int AVISaveOptionsFree(
    int nStreams,   // INT
    IntPtr plpOptions   // AVICOMPRESSOPTIONS**
);
<DllImport("AVIFIL32.dll", ExactSpelling:=True)>
Public Shared Function AVISaveOptionsFree(
    nStreams As Integer,   ' INT
    plpOptions As IntPtr   ' AVICOMPRESSOPTIONS**
) As Integer
End Function
' nStreams : INT
' plpOptions : AVICOMPRESSOPTIONS**
Declare PtrSafe Function AVISaveOptionsFree Lib "avifil32" ( _
    ByVal nStreams As Long, _
    ByVal plpOptions As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

AVISaveOptionsFree = ctypes.windll.avifil32.AVISaveOptionsFree
AVISaveOptionsFree.restype = ctypes.c_int
AVISaveOptionsFree.argtypes = [
    ctypes.c_int,  # nStreams : INT
    ctypes.c_void_p,  # plpOptions : AVICOMPRESSOPTIONS**
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('AVIFIL32.dll')
AVISaveOptionsFree = Fiddle::Function.new(
  lib['AVISaveOptionsFree'],
  [
    Fiddle::TYPE_INT,  # nStreams : INT
    Fiddle::TYPE_VOIDP,  # plpOptions : AVICOMPRESSOPTIONS**
  ],
  Fiddle::TYPE_INT)
#[link(name = "avifil32")]
extern "system" {
    fn AVISaveOptionsFree(
        nStreams: i32,  // INT
        plpOptions: *mut *mut AVICOMPRESSOPTIONS  // AVICOMPRESSOPTIONS**
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("AVIFIL32.dll")]
public static extern int AVISaveOptionsFree(int nStreams, IntPtr plpOptions);
"@
$api = Add-Type -MemberDefinition $sig -Name 'AVIFIL32_AVISaveOptionsFree' -Namespace Win32 -PassThru
# $api::AVISaveOptionsFree(nStreams, plpOptions)
#uselib "AVIFIL32.dll"
#func global AVISaveOptionsFree "AVISaveOptionsFree" sptr, sptr
; AVISaveOptionsFree nStreams, varptr(plpOptions)   ; 戻り値は stat
; nStreams : INT -> "sptr"
; plpOptions : AVICOMPRESSOPTIONS** -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "AVIFIL32.dll"
#cfunc global AVISaveOptionsFree "AVISaveOptionsFree" int, var
; res = AVISaveOptionsFree(nStreams, plpOptions)
; nStreams : INT -> "int"
; plpOptions : AVICOMPRESSOPTIONS** -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT AVISaveOptionsFree(INT nStreams, AVICOMPRESSOPTIONS** plpOptions)
#uselib "AVIFIL32.dll"
#cfunc global AVISaveOptionsFree "AVISaveOptionsFree" int, var
; res = AVISaveOptionsFree(nStreams, plpOptions)
; nStreams : INT -> "int"
; plpOptions : AVICOMPRESSOPTIONS** -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	avifil32 = windows.NewLazySystemDLL("AVIFIL32.dll")
	procAVISaveOptionsFree = avifil32.NewProc("AVISaveOptionsFree")
)

// nStreams (INT), plpOptions (AVICOMPRESSOPTIONS**)
r1, _, err := procAVISaveOptionsFree.Call(
	uintptr(nStreams),
	uintptr(plpOptions),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function AVISaveOptionsFree(
  nStreams: Integer;   // INT
  plpOptions: Pointer   // AVICOMPRESSOPTIONS**
): Integer; stdcall;
  external 'AVIFIL32.dll' name 'AVISaveOptionsFree';
result := DllCall("AVIFIL32\AVISaveOptionsFree"
    , "Int", nStreams   ; INT
    , "Ptr", plpOptions   ; AVICOMPRESSOPTIONS**
    , "Int")   ; return: HRESULT
●AVISaveOptionsFree(nStreams, plpOptions) = DLL("AVIFIL32.dll", "int AVISaveOptionsFree(int, void*)")
# 呼び出し: AVISaveOptionsFree(nStreams, plpOptions)
# nStreams : INT -> "int"
# plpOptions : AVICOMPRESSOPTIONS** -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。