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