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