ホーム › System.Diagnostics.Debug › SymSrvIsStore
SymSrvIsStore
関数指定パスがシンボルストアかどうか判定する。
シグネチャ
// dbghelp.dll (ANSI / -A)
#include <windows.h>
BOOL SymSrvIsStore(
HANDLE hProcess, // optional
LPCSTR path
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hProcess | HANDLE | inoptional |
| path | LPCSTR | in |
戻り値の型: BOOL
各言語での呼び出し定義
// dbghelp.dll (ANSI / -A)
#include <windows.h>
BOOL SymSrvIsStore(
HANDLE hProcess, // optional
LPCSTR path
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("dbghelp.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
static extern bool SymSrvIsStore(
IntPtr hProcess, // HANDLE optional
[MarshalAs(UnmanagedType.LPStr)] string path // LPCSTR
);<DllImport("dbghelp.dll", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
Public Shared Function SymSrvIsStore(
hProcess As IntPtr, ' HANDLE optional
<MarshalAs(UnmanagedType.LPStr)> path As String ' LPCSTR
) As Boolean
End Function' hProcess : HANDLE optional
' path : LPCSTR
Declare PtrSafe Function SymSrvIsStore Lib "dbghelp" ( _
ByVal hProcess As LongPtr, _
ByVal path As String) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SymSrvIsStore = ctypes.windll.dbghelp.SymSrvIsStore
SymSrvIsStore.restype = wintypes.BOOL
SymSrvIsStore.argtypes = [
wintypes.HANDLE, # hProcess : HANDLE optional
wintypes.LPCSTR, # path : LPCSTR
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('dbghelp.dll')
SymSrvIsStore = Fiddle::Function.new(
lib['SymSrvIsStore'],
[
Fiddle::TYPE_VOIDP, # hProcess : HANDLE optional
Fiddle::TYPE_VOIDP, # path : LPCSTR
],
Fiddle::TYPE_INT)#[link(name = "dbghelp")]
extern "system" {
fn SymSrvIsStore(
hProcess: *mut core::ffi::c_void, // HANDLE optional
path: *const u8 // LPCSTR
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("dbghelp.dll", CharSet = CharSet.Ansi, SetLastError = true)]
public static extern bool SymSrvIsStore(IntPtr hProcess, [MarshalAs(UnmanagedType.LPStr)] string path);
"@
$api = Add-Type -MemberDefinition $sig -Name 'dbghelp_SymSrvIsStore' -Namespace Win32 -PassThru
# $api::SymSrvIsStore(hProcess, path)#uselib "dbghelp.dll"
#func global SymSrvIsStore "SymSrvIsStore" sptr, sptr
; SymSrvIsStore hProcess, path ; 戻り値は stat
; hProcess : HANDLE optional -> "sptr"
; path : LPCSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "dbghelp.dll"
#cfunc global SymSrvIsStore "SymSrvIsStore" sptr, str
; res = SymSrvIsStore(hProcess, path)
; hProcess : HANDLE optional -> "sptr"
; path : LPCSTR -> "str"; BOOL SymSrvIsStore(HANDLE hProcess, LPCSTR path)
#uselib "dbghelp.dll"
#cfunc global SymSrvIsStore "SymSrvIsStore" intptr, str
; res = SymSrvIsStore(hProcess, path)
; hProcess : HANDLE optional -> "intptr"
; path : LPCSTR -> "str"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dbghelp = windows.NewLazySystemDLL("dbghelp.dll")
procSymSrvIsStore = dbghelp.NewProc("SymSrvIsStore")
)
// hProcess (HANDLE optional), path (LPCSTR)
r1, _, err := procSymSrvIsStore.Call(
uintptr(hProcess),
uintptr(unsafe.Pointer(windows.BytePtrFromString(path))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction SymSrvIsStore(
hProcess: THandle; // HANDLE optional
path: PAnsiChar // LPCSTR
): BOOL; stdcall;
external 'dbghelp.dll' name 'SymSrvIsStore';result := DllCall("dbghelp\SymSrvIsStore"
, "Ptr", hProcess ; HANDLE optional
, "AStr", path ; LPCSTR
, "Int") ; return: BOOL●SymSrvIsStore(hProcess, path) = DLL("dbghelp.dll", "bool SymSrvIsStore(void*, char*)")
# 呼び出し: SymSrvIsStore(hProcess, path)
# hProcess : HANDLE optional -> "void*"
# path : LPCSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。