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