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

DragFinish

関数
ドラッグ&ドロップで確保されたメモリを解放する。
DLLSHELL32.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

// SHELL32.dll
#include <windows.h>

void DragFinish(
    HDROP hDrop
);

パラメーター

名前方向
hDropHDROPin

戻り値の型: void

各言語での呼び出し定義

// SHELL32.dll
#include <windows.h>

void DragFinish(
    HDROP hDrop
);
[DllImport("SHELL32.dll", ExactSpelling = true)]
static extern void DragFinish(
    IntPtr hDrop   // HDROP
);
<DllImport("SHELL32.dll", ExactSpelling:=True)>
Public Shared Sub DragFinish(
    hDrop As IntPtr   ' HDROP
)
End Sub
' hDrop : HDROP
Declare PtrSafe Sub DragFinish Lib "shell32" ( _
    ByVal hDrop As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

DragFinish = ctypes.windll.shell32.DragFinish
DragFinish.restype = None
DragFinish.argtypes = [
    wintypes.HANDLE,  # hDrop : HDROP
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('SHELL32.dll')
DragFinish = Fiddle::Function.new(
  lib['DragFinish'],
  [
    Fiddle::TYPE_VOIDP,  # hDrop : HDROP
  ],
  Fiddle::TYPE_VOID)
#[link(name = "shell32")]
extern "system" {
    fn DragFinish(
        hDrop: *mut core::ffi::c_void  // HDROP
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("SHELL32.dll")]
public static extern void DragFinish(IntPtr hDrop);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SHELL32_DragFinish' -Namespace Win32 -PassThru
# $api::DragFinish(hDrop)
#uselib "SHELL32.dll"
#func global DragFinish "DragFinish" sptr
; DragFinish hDrop
; hDrop : HDROP -> "sptr"
#uselib "SHELL32.dll"
#func global DragFinish "DragFinish" sptr
; DragFinish hDrop
; hDrop : HDROP -> "sptr"
; void DragFinish(HDROP hDrop)
#uselib "SHELL32.dll"
#func global DragFinish "DragFinish" intptr
; DragFinish hDrop
; hDrop : HDROP -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	shell32 = windows.NewLazySystemDLL("SHELL32.dll")
	procDragFinish = shell32.NewProc("DragFinish")
)

// hDrop (HDROP)
r1, _, err := procDragFinish.Call(
	uintptr(hDrop),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure DragFinish(
  hDrop: THandle   // HDROP
); stdcall;
  external 'SHELL32.dll' name 'DragFinish';
result := DllCall("SHELL32\DragFinish"
    , "Ptr", hDrop   ; HDROP
    , "Int")   ; return: void
●DragFinish(hDrop) = DLL("SHELL32.dll", "int DragFinish(void*)")
# 呼び出し: DragFinish(hDrop)
# hDrop : HDROP -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。