ホーム › Graphics.GdiPlus › GdipFlush
GdipFlush
関数保留中の描画コマンドを実行して反映する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipFlush(
GpGraphics* graphics,
FlushIntention intention
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| graphics | GpGraphics* | inout |
| intention | FlushIntention | in |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipFlush(
GpGraphics* graphics,
FlushIntention intention
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipFlush(
IntPtr graphics, // GpGraphics* in/out
int intention // FlushIntention
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipFlush(
graphics As IntPtr, ' GpGraphics* in/out
intention As Integer ' FlushIntention
) As Integer
End Function' graphics : GpGraphics* in/out
' intention : FlushIntention
Declare PtrSafe Function GdipFlush Lib "gdiplus" ( _
ByVal graphics As LongPtr, _
ByVal intention As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipFlush = ctypes.windll.gdiplus.GdipFlush
GdipFlush.restype = ctypes.c_int
GdipFlush.argtypes = [
ctypes.c_void_p, # graphics : GpGraphics* in/out
ctypes.c_int, # intention : FlushIntention
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipFlush = Fiddle::Function.new(
lib['GdipFlush'],
[
Fiddle::TYPE_VOIDP, # graphics : GpGraphics* in/out
Fiddle::TYPE_INT, # intention : FlushIntention
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipFlush(
graphics: *mut GpGraphics, // GpGraphics* in/out
intention: i32 // FlushIntention
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipFlush(IntPtr graphics, int intention);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipFlush' -Namespace Win32 -PassThru
# $api::GdipFlush(graphics, intention)#uselib "gdiplus.dll"
#func global GdipFlush "GdipFlush" sptr, sptr
; GdipFlush varptr(graphics), intention ; 戻り値は stat
; graphics : GpGraphics* in/out -> "sptr"
; intention : FlushIntention -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipFlush "GdipFlush" var, int ; res = GdipFlush(graphics, intention) ; graphics : GpGraphics* in/out -> "var" ; intention : FlushIntention -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipFlush "GdipFlush" sptr, int ; res = GdipFlush(varptr(graphics), intention) ; graphics : GpGraphics* in/out -> "sptr" ; intention : FlushIntention -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipFlush(GpGraphics* graphics, FlushIntention intention) #uselib "gdiplus.dll" #cfunc global GdipFlush "GdipFlush" var, int ; res = GdipFlush(graphics, intention) ; graphics : GpGraphics* in/out -> "var" ; intention : FlushIntention -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipFlush(GpGraphics* graphics, FlushIntention intention) #uselib "gdiplus.dll" #cfunc global GdipFlush "GdipFlush" intptr, int ; res = GdipFlush(varptr(graphics), intention) ; graphics : GpGraphics* in/out -> "intptr" ; intention : FlushIntention -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipFlush = gdiplus.NewProc("GdipFlush")
)
// graphics (GpGraphics* in/out), intention (FlushIntention)
r1, _, err := procGdipFlush.Call(
uintptr(graphics),
uintptr(intention),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipFlush(
graphics: Pointer; // GpGraphics* in/out
intention: Integer // FlushIntention
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipFlush';result := DllCall("gdiplus\GdipFlush"
, "Ptr", graphics ; GpGraphics* in/out
, "Int", intention ; FlushIntention
, "Int") ; return: Status●GdipFlush(graphics, intention) = DLL("gdiplus.dll", "int GdipFlush(void*, int)")
# 呼び出し: GdipFlush(graphics, intention)
# graphics : GpGraphics* in/out -> "void*"
# intention : FlushIntention -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。