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