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