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