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

SetupColorMatchingW

関数
色照合設定ダイアログを表示する(Unicode版)。
DLLICMUI.dll文字セットUnicode (-W)呼出規約winapi

シグネチャ

// ICMUI.dll  (Unicode / -W)
#include <windows.h>

BOOL SetupColorMatchingW(
    COLORMATCHSETUPW* pcms
);

パラメーター

名前方向
pcmsCOLORMATCHSETUPW*inout

戻り値の型: BOOL

各言語での呼び出し定義

// ICMUI.dll  (Unicode / -W)
#include <windows.h>

BOOL SetupColorMatchingW(
    COLORMATCHSETUPW* pcms
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("ICMUI.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern bool SetupColorMatchingW(
    IntPtr pcms   // COLORMATCHSETUPW* in/out
);
<DllImport("ICMUI.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function SetupColorMatchingW(
    pcms As IntPtr   ' COLORMATCHSETUPW* in/out
) As Boolean
End Function
' pcms : COLORMATCHSETUPW* in/out
Declare PtrSafe Function SetupColorMatchingW Lib "icmui" ( _
    ByVal pcms As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

SetupColorMatchingW = ctypes.windll.icmui.SetupColorMatchingW
SetupColorMatchingW.restype = wintypes.BOOL
SetupColorMatchingW.argtypes = [
    ctypes.c_void_p,  # pcms : COLORMATCHSETUPW* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ICMUI.dll')
SetupColorMatchingW = Fiddle::Function.new(
  lib['SetupColorMatchingW'],
  [
    Fiddle::TYPE_VOIDP,  # pcms : COLORMATCHSETUPW* in/out
  ],
  Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "icmui")]
extern "system" {
    fn SetupColorMatchingW(
        pcms: *mut COLORMATCHSETUPW  // COLORMATCHSETUPW* in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("ICMUI.dll", CharSet = CharSet.Unicode)]
public static extern bool SetupColorMatchingW(IntPtr pcms);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ICMUI_SetupColorMatchingW' -Namespace Win32 -PassThru
# $api::SetupColorMatchingW(pcms)
#uselib "ICMUI.dll"
#func global SetupColorMatchingW "SetupColorMatchingW" wptr
; SetupColorMatchingW varptr(pcms)   ; 戻り値は stat
; pcms : COLORMATCHSETUPW* in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "ICMUI.dll"
#cfunc global SetupColorMatchingW "SetupColorMatchingW" var
; res = SetupColorMatchingW(pcms)
; pcms : COLORMATCHSETUPW* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; BOOL SetupColorMatchingW(COLORMATCHSETUPW* pcms)
#uselib "ICMUI.dll"
#cfunc global SetupColorMatchingW "SetupColorMatchingW" var
; res = SetupColorMatchingW(pcms)
; pcms : COLORMATCHSETUPW* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icmui = windows.NewLazySystemDLL("ICMUI.dll")
	procSetupColorMatchingW = icmui.NewProc("SetupColorMatchingW")
)

// pcms (COLORMATCHSETUPW* in/out)
r1, _, err := procSetupColorMatchingW.Call(
	uintptr(pcms),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function SetupColorMatchingW(
  pcms: Pointer   // COLORMATCHSETUPW* in/out
): BOOL; stdcall;
  external 'ICMUI.dll' name 'SetupColorMatchingW';
result := DllCall("ICMUI\SetupColorMatchingW"
    , "Ptr", pcms   ; COLORMATCHSETUPW* in/out
    , "Int")   ; return: BOOL
●SetupColorMatchingW(pcms) = DLL("ICMUI.dll", "bool SetupColorMatchingW(void*)")
# 呼び出し: SetupColorMatchingW(pcms)
# pcms : COLORMATCHSETUPW* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。