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