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