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