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