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