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

COLORMATCHSETUPA

構造体
サイズx64: 136 バイト / x86: 76 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
dwSizeDWORD4+0+0この構造体のサイズ(バイト)。
dwVersionDWORD4+4+4構造体のバージョン番号。
dwFlagsDWORD4+8+8カラーマッチ設定ダイアログの動作を制御するフラグ群。
hwndOwnerHWND8/4+16+12ダイアログの親ウィンドウハンドル。
pSourceNameLPSTR8/4+24+16ソースプロファイル説明名へのANSI文字列ポインタ。
pDisplayNameLPSTR8/4+32+20ディスプレイデバイス名へのANSI文字列ポインタ。
pPrinterNameLPSTR8/4+40+24プリンターデバイス名へのANSI文字列ポインタ。
dwRenderIntentDWORD4+48+28レンダリングインテントを示す値。
dwProofingIntentDWORD4+52+32プルーフィング用インテントを示す値。
pMonitorProfileLPSTR8/4+56+36モニタープロファイルのパスへのANSI文字列ポインタ。
ccMonitorProfileDWORD4+64+40pMonitorProfileバッファの文字数。
pPrinterProfileLPSTR8/4+72+44プリンタープロファイルのパスへのANSI文字列ポインタ。
ccPrinterProfileDWORD4+80+48pPrinterProfileバッファの文字数。
pTargetProfileLPSTR8/4+88+52ターゲットプロファイルのパスへのANSI文字列ポインタ。
ccTargetProfileDWORD4+96+56pTargetProfileバッファの文字数。
lpfnHookDLGPROC8/4+104+60ダイアログメッセージを処理するフックプロシージャ。NULL可。
lParamLPARAM8/4+112+64フックプロシージャに渡すアプリ定義データ。
lpfnApplyCallbackPCMSCALLBACKA8/4+120+68適用ボタン押下時に呼ばれるコールバック。NULL可。
lParamApplyCallbackLPARAM8/4+128+72適用コールバックに渡すアプリ定義データ。

各言語での定義

#include <windows.h>

// COLORMATCHSETUPA  (x64 136 / x86 76 バイト)
typedef struct COLORMATCHSETUPA {
    DWORD dwSize;
    DWORD dwVersion;
    DWORD dwFlags;
    HWND hwndOwner;
    LPSTR pSourceName;
    LPSTR pDisplayName;
    LPSTR pPrinterName;
    DWORD dwRenderIntent;
    DWORD dwProofingIntent;
    LPSTR pMonitorProfile;
    DWORD ccMonitorProfile;
    LPSTR pPrinterProfile;
    DWORD ccPrinterProfile;
    LPSTR pTargetProfile;
    DWORD ccTargetProfile;
    DLGPROC lpfnHook;
    LPARAM lParam;
    PCMSCALLBACKA lpfnApplyCallback;
    LPARAM lParamApplyCallback;
} COLORMATCHSETUPA;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct COLORMATCHSETUPA
{
    public uint dwSize;
    public uint dwVersion;
    public uint dwFlags;
    public IntPtr hwndOwner;
    public IntPtr pSourceName;
    public IntPtr pDisplayName;
    public IntPtr pPrinterName;
    public uint dwRenderIntent;
    public uint dwProofingIntent;
    public IntPtr pMonitorProfile;
    public uint ccMonitorProfile;
    public IntPtr pPrinterProfile;
    public uint ccPrinterProfile;
    public IntPtr pTargetProfile;
    public uint ccTargetProfile;
    public IntPtr lpfnHook;
    public IntPtr lParam;
    public IntPtr lpfnApplyCallback;
    public IntPtr lParamApplyCallback;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure COLORMATCHSETUPA
    Public dwSize As UInteger
    Public dwVersion As UInteger
    Public dwFlags As UInteger
    Public hwndOwner As IntPtr
    Public pSourceName As IntPtr
    Public pDisplayName As IntPtr
    Public pPrinterName As IntPtr
    Public dwRenderIntent As UInteger
    Public dwProofingIntent As UInteger
    Public pMonitorProfile As IntPtr
    Public ccMonitorProfile As UInteger
    Public pPrinterProfile As IntPtr
    Public ccPrinterProfile As UInteger
    Public pTargetProfile As IntPtr
    Public ccTargetProfile As UInteger
    Public lpfnHook As IntPtr
    Public lParam As IntPtr
    Public lpfnApplyCallback As IntPtr
    Public lParamApplyCallback As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class COLORMATCHSETUPA(ctypes.Structure):
    _fields_ = [
        ("dwSize", wintypes.DWORD),
        ("dwVersion", wintypes.DWORD),
        ("dwFlags", wintypes.DWORD),
        ("hwndOwner", ctypes.c_void_p),
        ("pSourceName", ctypes.c_void_p),
        ("pDisplayName", ctypes.c_void_p),
        ("pPrinterName", ctypes.c_void_p),
        ("dwRenderIntent", wintypes.DWORD),
        ("dwProofingIntent", wintypes.DWORD),
        ("pMonitorProfile", ctypes.c_void_p),
        ("ccMonitorProfile", wintypes.DWORD),
        ("pPrinterProfile", ctypes.c_void_p),
        ("ccPrinterProfile", wintypes.DWORD),
        ("pTargetProfile", ctypes.c_void_p),
        ("ccTargetProfile", wintypes.DWORD),
        ("lpfnHook", ctypes.c_void_p),
        ("lParam", ctypes.c_ssize_t),
        ("lpfnApplyCallback", ctypes.c_void_p),
        ("lParamApplyCallback", ctypes.c_ssize_t),
    ]
#[repr(C)]
pub struct COLORMATCHSETUPA {
    pub dwSize: u32,
    pub dwVersion: u32,
    pub dwFlags: u32,
    pub hwndOwner: *mut core::ffi::c_void,
    pub pSourceName: *mut core::ffi::c_void,
    pub pDisplayName: *mut core::ffi::c_void,
    pub pPrinterName: *mut core::ffi::c_void,
    pub dwRenderIntent: u32,
    pub dwProofingIntent: u32,
    pub pMonitorProfile: *mut core::ffi::c_void,
    pub ccMonitorProfile: u32,
    pub pPrinterProfile: *mut core::ffi::c_void,
    pub ccPrinterProfile: u32,
    pub pTargetProfile: *mut core::ffi::c_void,
    pub ccTargetProfile: u32,
    pub lpfnHook: *mut core::ffi::c_void,
    pub lParam: isize,
    pub lpfnApplyCallback: *mut core::ffi::c_void,
    pub lParamApplyCallback: isize,
}
import "golang.org/x/sys/windows"

type COLORMATCHSETUPA struct {
	dwSize uint32
	dwVersion uint32
	dwFlags uint32
	hwndOwner uintptr
	pSourceName uintptr
	pDisplayName uintptr
	pPrinterName uintptr
	dwRenderIntent uint32
	dwProofingIntent uint32
	pMonitorProfile uintptr
	ccMonitorProfile uint32
	pPrinterProfile uintptr
	ccPrinterProfile uint32
	pTargetProfile uintptr
	ccTargetProfile uint32
	lpfnHook uintptr
	lParam uintptr
	lpfnApplyCallback uintptr
	lParamApplyCallback uintptr
}
type
  COLORMATCHSETUPA = record
    dwSize: DWORD;
    dwVersion: DWORD;
    dwFlags: DWORD;
    hwndOwner: Pointer;
    pSourceName: Pointer;
    pDisplayName: Pointer;
    pPrinterName: Pointer;
    dwRenderIntent: DWORD;
    dwProofingIntent: DWORD;
    pMonitorProfile: Pointer;
    ccMonitorProfile: DWORD;
    pPrinterProfile: Pointer;
    ccPrinterProfile: DWORD;
    pTargetProfile: Pointer;
    ccTargetProfile: DWORD;
    lpfnHook: Pointer;
    lParam: NativeInt;
    lpfnApplyCallback: Pointer;
    lParamApplyCallback: NativeInt;
  end;
const COLORMATCHSETUPA = extern struct {
    dwSize: u32,
    dwVersion: u32,
    dwFlags: u32,
    hwndOwner: ?*anyopaque,
    pSourceName: ?*anyopaque,
    pDisplayName: ?*anyopaque,
    pPrinterName: ?*anyopaque,
    dwRenderIntent: u32,
    dwProofingIntent: u32,
    pMonitorProfile: ?*anyopaque,
    ccMonitorProfile: u32,
    pPrinterProfile: ?*anyopaque,
    ccPrinterProfile: u32,
    pTargetProfile: ?*anyopaque,
    ccTargetProfile: u32,
    lpfnHook: ?*anyopaque,
    lParam: isize,
    lpfnApplyCallback: ?*anyopaque,
    lParamApplyCallback: isize,
};
type
  COLORMATCHSETUPA {.bycopy.} = object
    dwSize: uint32
    dwVersion: uint32
    dwFlags: uint32
    hwndOwner: pointer
    pSourceName: pointer
    pDisplayName: pointer
    pPrinterName: pointer
    dwRenderIntent: uint32
    dwProofingIntent: uint32
    pMonitorProfile: pointer
    ccMonitorProfile: uint32
    pPrinterProfile: pointer
    ccPrinterProfile: uint32
    pTargetProfile: pointer
    ccTargetProfile: uint32
    lpfnHook: pointer
    lParam: int
    lpfnApplyCallback: pointer
    lParamApplyCallback: int
struct COLORMATCHSETUPA
{
    uint dwSize;
    uint dwVersion;
    uint dwFlags;
    void* hwndOwner;
    void* pSourceName;
    void* pDisplayName;
    void* pPrinterName;
    uint dwRenderIntent;
    uint dwProofingIntent;
    void* pMonitorProfile;
    uint ccMonitorProfile;
    void* pPrinterProfile;
    uint ccPrinterProfile;
    void* pTargetProfile;
    uint ccTargetProfile;
    void* lpfnHook;
    ptrdiff_t lParam;
    void* lpfnApplyCallback;
    ptrdiff_t lParamApplyCallback;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; COLORMATCHSETUPA サイズ: 76 バイト(x86)
dim st, 19    ; 4byte整数×19(構造体サイズ 76 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; dwVersion : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; dwFlags : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; hwndOwner : HWND (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pSourceName : LPSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pDisplayName : LPSTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; pPrinterName : LPSTR (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; dwRenderIntent : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; dwProofingIntent : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; pMonitorProfile : LPSTR (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; ccMonitorProfile : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; pPrinterProfile : LPSTR (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; ccPrinterProfile : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; pTargetProfile : LPSTR (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; ccTargetProfile : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; lpfnHook : DLGPROC (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; lParam : LPARAM (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; lpfnApplyCallback : PCMSCALLBACKA (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; lParamApplyCallback : LPARAM (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; COLORMATCHSETUPA サイズ: 136 バイト(x64)
dim st, 34    ; 4byte整数×34(構造体サイズ 136 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; dwVersion : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; dwFlags : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; hwndOwner : HWND (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pSourceName : LPSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pDisplayName : LPSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pPrinterName : LPSTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; dwRenderIntent : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; dwProofingIntent : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; pMonitorProfile : LPSTR (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ccMonitorProfile : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; pPrinterProfile : LPSTR (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ccPrinterProfile : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; pTargetProfile : LPSTR (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; ccTargetProfile : DWORD (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; lpfnHook : DLGPROC (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; lParam : LPARAM (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; lpfnApplyCallback : PCMSCALLBACKA (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; lParamApplyCallback : LPARAM (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global COLORMATCHSETUPA
    #field int dwSize
    #field int dwVersion
    #field int dwFlags
    #field intptr hwndOwner
    #field intptr pSourceName
    #field intptr pDisplayName
    #field intptr pPrinterName
    #field int dwRenderIntent
    #field int dwProofingIntent
    #field intptr pMonitorProfile
    #field int ccMonitorProfile
    #field intptr pPrinterProfile
    #field int ccPrinterProfile
    #field intptr pTargetProfile
    #field int ccTargetProfile
    #field intptr lpfnHook
    #field intptr lParam
    #field intptr lpfnApplyCallback
    #field intptr lParamApplyCallback
#endstruct

stdim st, COLORMATCHSETUPA        ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize