ホーム › UI.ColorSystem › WcsCreateIccProfile
WcsCreateIccProfile
関数WCSプロファイルから互換ICCプロファイルを生成する。
シグネチャ
// mscms.dll
#include <windows.h>
INT_PTR WcsCreateIccProfile(
INT_PTR hWcsProfile,
DWORD dwOptions
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWcsProfile | INT_PTR | in |
| dwOptions | DWORD | in |
戻り値の型: INT_PTR
各言語での呼び出し定義
// mscms.dll
#include <windows.h>
INT_PTR WcsCreateIccProfile(
INT_PTR hWcsProfile,
DWORD dwOptions
);[DllImport("mscms.dll", ExactSpelling = true)]
static extern IntPtr WcsCreateIccProfile(
IntPtr hWcsProfile, // INT_PTR
uint dwOptions // DWORD
);<DllImport("mscms.dll", ExactSpelling:=True)>
Public Shared Function WcsCreateIccProfile(
hWcsProfile As IntPtr, ' INT_PTR
dwOptions As UInteger ' DWORD
) As IntPtr
End Function' hWcsProfile : INT_PTR
' dwOptions : DWORD
Declare PtrSafe Function WcsCreateIccProfile Lib "mscms" ( _
ByVal hWcsProfile As LongPtr, _
ByVal dwOptions As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WcsCreateIccProfile = ctypes.windll.mscms.WcsCreateIccProfile
WcsCreateIccProfile.restype = ctypes.c_ssize_t
WcsCreateIccProfile.argtypes = [
ctypes.c_ssize_t, # hWcsProfile : INT_PTR
wintypes.DWORD, # dwOptions : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('mscms.dll')
WcsCreateIccProfile = Fiddle::Function.new(
lib['WcsCreateIccProfile'],
[
Fiddle::TYPE_INTPTR_T, # hWcsProfile : INT_PTR
-Fiddle::TYPE_INT, # dwOptions : DWORD
],
Fiddle::TYPE_INTPTR_T)#[link(name = "mscms")]
extern "system" {
fn WcsCreateIccProfile(
hWcsProfile: isize, // INT_PTR
dwOptions: u32 // DWORD
) -> isize;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("mscms.dll")]
public static extern IntPtr WcsCreateIccProfile(IntPtr hWcsProfile, uint dwOptions);
"@
$api = Add-Type -MemberDefinition $sig -Name 'mscms_WcsCreateIccProfile' -Namespace Win32 -PassThru
# $api::WcsCreateIccProfile(hWcsProfile, dwOptions)#uselib "mscms.dll"
#func global WcsCreateIccProfile "WcsCreateIccProfile" sptr, sptr
; WcsCreateIccProfile hWcsProfile, dwOptions ; 戻り値は stat
; hWcsProfile : INT_PTR -> "sptr"
; dwOptions : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "mscms.dll"
#cfunc global WcsCreateIccProfile "WcsCreateIccProfile" sptr, int
; res = WcsCreateIccProfile(hWcsProfile, dwOptions)
; hWcsProfile : INT_PTR -> "sptr"
; dwOptions : DWORD -> "int"; INT_PTR WcsCreateIccProfile(INT_PTR hWcsProfile, DWORD dwOptions)
#uselib "mscms.dll"
#cfunc global WcsCreateIccProfile "WcsCreateIccProfile" intptr, int
; res = WcsCreateIccProfile(hWcsProfile, dwOptions)
; hWcsProfile : INT_PTR -> "intptr"
; dwOptions : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mscms = windows.NewLazySystemDLL("mscms.dll")
procWcsCreateIccProfile = mscms.NewProc("WcsCreateIccProfile")
)
// hWcsProfile (INT_PTR), dwOptions (DWORD)
r1, _, err := procWcsCreateIccProfile.Call(
uintptr(hWcsProfile),
uintptr(dwOptions),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INT_PTRfunction WcsCreateIccProfile(
hWcsProfile: NativeInt; // INT_PTR
dwOptions: DWORD // DWORD
): NativeInt; stdcall;
external 'mscms.dll' name 'WcsCreateIccProfile';result := DllCall("mscms\WcsCreateIccProfile"
, "Ptr", hWcsProfile ; INT_PTR
, "UInt", dwOptions ; DWORD
, "Ptr") ; return: INT_PTR●WcsCreateIccProfile(hWcsProfile, dwOptions) = DLL("mscms.dll", "int WcsCreateIccProfile(int, dword)")
# 呼び出し: WcsCreateIccProfile(hWcsProfile, dwOptions)
# hWcsProfile : INT_PTR -> "int"
# dwOptions : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。