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

SetupColorMatchingA

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

シグネチャ

// ICMUI.dll  (ANSI / -A)
#include <windows.h>

BOOL SetupColorMatchingA(
    COLORMATCHSETUPA* pcms
);

パラメーター

名前方向
pcmsCOLORMATCHSETUPA*inout

戻り値の型: BOOL

各言語での呼び出し定義

// ICMUI.dll  (ANSI / -A)
#include <windows.h>

BOOL SetupColorMatchingA(
    COLORMATCHSETUPA* pcms
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("ICMUI.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern bool SetupColorMatchingA(
    IntPtr pcms   // COLORMATCHSETUPA* in/out
);
<DllImport("ICMUI.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function SetupColorMatchingA(
    pcms As IntPtr   ' COLORMATCHSETUPA* in/out
) As Boolean
End Function
' pcms : COLORMATCHSETUPA* in/out
Declare PtrSafe Function SetupColorMatchingA Lib "icmui" ( _
    ByVal pcms As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

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

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

var (
	icmui = windows.NewLazySystemDLL("ICMUI.dll")
	procSetupColorMatchingA = icmui.NewProc("SetupColorMatchingA")
)

// pcms (COLORMATCHSETUPA* in/out)
r1, _, err := procSetupColorMatchingA.Call(
	uintptr(pcms),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function SetupColorMatchingA(
  pcms: Pointer   // COLORMATCHSETUPA* in/out
): BOOL; stdcall;
  external 'ICMUI.dll' name 'SetupColorMatchingA';
result := DllCall("ICMUI\SetupColorMatchingA"
    , "Ptr", pcms   ; COLORMATCHSETUPA* in/out
    , "Int")   ; return: BOOL
●SetupColorMatchingA(pcms) = DLL("ICMUI.dll", "bool SetupColorMatchingA(void*)")
# 呼び出し: SetupColorMatchingA(pcms)
# pcms : COLORMATCHSETUPA* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。