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