Win32 API 日本語リファレンス
ホームUI.Controls › EndBufferedAnimation

EndBufferedAnimation

関数
バッファアニメーション描画を終了する。
DLLUxTheme.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

HRESULT EndBufferedAnimation(
    INT_PTR hbpAnimation,
    BOOL fUpdateTarget
);

パラメーター

名前方向
hbpAnimationINT_PTRin
fUpdateTargetBOOLin

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT EndBufferedAnimation(
    INT_PTR hbpAnimation,
    BOOL fUpdateTarget
);
[DllImport("UxTheme.dll", ExactSpelling = true)]
static extern int EndBufferedAnimation(
    IntPtr hbpAnimation,   // INT_PTR
    bool fUpdateTarget   // BOOL
);
<DllImport("UxTheme.dll", ExactSpelling:=True)>
Public Shared Function EndBufferedAnimation(
    hbpAnimation As IntPtr,   ' INT_PTR
    fUpdateTarget As Boolean   ' BOOL
) As Integer
End Function
' hbpAnimation : INT_PTR
' fUpdateTarget : BOOL
Declare PtrSafe Function EndBufferedAnimation Lib "uxtheme" ( _
    ByVal hbpAnimation As LongPtr, _
    ByVal fUpdateTarget As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

EndBufferedAnimation = ctypes.windll.uxtheme.EndBufferedAnimation
EndBufferedAnimation.restype = ctypes.c_int
EndBufferedAnimation.argtypes = [
    ctypes.c_ssize_t,  # hbpAnimation : INT_PTR
    wintypes.BOOL,  # fUpdateTarget : BOOL
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('UxTheme.dll')
EndBufferedAnimation = Fiddle::Function.new(
  lib['EndBufferedAnimation'],
  [
    Fiddle::TYPE_INTPTR_T,  # hbpAnimation : INT_PTR
    Fiddle::TYPE_INT,  # fUpdateTarget : BOOL
  ],
  Fiddle::TYPE_INT)
#[link(name = "uxtheme")]
extern "system" {
    fn EndBufferedAnimation(
        hbpAnimation: isize,  // INT_PTR
        fUpdateTarget: i32  // BOOL
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("UxTheme.dll")]
public static extern int EndBufferedAnimation(IntPtr hbpAnimation, bool fUpdateTarget);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UxTheme_EndBufferedAnimation' -Namespace Win32 -PassThru
# $api::EndBufferedAnimation(hbpAnimation, fUpdateTarget)
#uselib "UxTheme.dll"
#func global EndBufferedAnimation "EndBufferedAnimation" sptr, sptr
; EndBufferedAnimation hbpAnimation, fUpdateTarget   ; 戻り値は stat
; hbpAnimation : INT_PTR -> "sptr"
; fUpdateTarget : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "UxTheme.dll"
#cfunc global EndBufferedAnimation "EndBufferedAnimation" sptr, int
; res = EndBufferedAnimation(hbpAnimation, fUpdateTarget)
; hbpAnimation : INT_PTR -> "sptr"
; fUpdateTarget : BOOL -> "int"
; HRESULT EndBufferedAnimation(INT_PTR hbpAnimation, BOOL fUpdateTarget)
#uselib "UxTheme.dll"
#cfunc global EndBufferedAnimation "EndBufferedAnimation" intptr, int
; res = EndBufferedAnimation(hbpAnimation, fUpdateTarget)
; hbpAnimation : INT_PTR -> "intptr"
; fUpdateTarget : BOOL -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	uxtheme = windows.NewLazySystemDLL("UxTheme.dll")
	procEndBufferedAnimation = uxtheme.NewProc("EndBufferedAnimation")
)

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