ホーム › Networking.WinInet › ShowSecurityInfo
ShowSecurityInfo
関数セキュリティ情報をダイアログとして表示する。
シグネチャ
// WININET.dll
#include <windows.h>
DWORD ShowSecurityInfo(
HWND hWndParent,
INTERNET_SECURITY_INFO* pSecurityInfo
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWndParent | HWND | in |
| pSecurityInfo | INTERNET_SECURITY_INFO* | in |
戻り値の型: DWORD
各言語での呼び出し定義
// WININET.dll
#include <windows.h>
DWORD ShowSecurityInfo(
HWND hWndParent,
INTERNET_SECURITY_INFO* pSecurityInfo
);[DllImport("WININET.dll", ExactSpelling = true)]
static extern uint ShowSecurityInfo(
IntPtr hWndParent, // HWND
IntPtr pSecurityInfo // INTERNET_SECURITY_INFO*
);<DllImport("WININET.dll", ExactSpelling:=True)>
Public Shared Function ShowSecurityInfo(
hWndParent As IntPtr, ' HWND
pSecurityInfo As IntPtr ' INTERNET_SECURITY_INFO*
) As UInteger
End Function' hWndParent : HWND
' pSecurityInfo : INTERNET_SECURITY_INFO*
Declare PtrSafe Function ShowSecurityInfo Lib "wininet" ( _
ByVal hWndParent As LongPtr, _
ByVal pSecurityInfo As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ShowSecurityInfo = ctypes.windll.wininet.ShowSecurityInfo
ShowSecurityInfo.restype = wintypes.DWORD
ShowSecurityInfo.argtypes = [
wintypes.HANDLE, # hWndParent : HWND
ctypes.c_void_p, # pSecurityInfo : INTERNET_SECURITY_INFO*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WININET.dll')
ShowSecurityInfo = Fiddle::Function.new(
lib['ShowSecurityInfo'],
[
Fiddle::TYPE_VOIDP, # hWndParent : HWND
Fiddle::TYPE_VOIDP, # pSecurityInfo : INTERNET_SECURITY_INFO*
],
-Fiddle::TYPE_INT)#[link(name = "wininet")]
extern "system" {
fn ShowSecurityInfo(
hWndParent: *mut core::ffi::c_void, // HWND
pSecurityInfo: *mut INTERNET_SECURITY_INFO // INTERNET_SECURITY_INFO*
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("WININET.dll")]
public static extern uint ShowSecurityInfo(IntPtr hWndParent, IntPtr pSecurityInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_ShowSecurityInfo' -Namespace Win32 -PassThru
# $api::ShowSecurityInfo(hWndParent, pSecurityInfo)#uselib "WININET.dll"
#func global ShowSecurityInfo "ShowSecurityInfo" sptr, sptr
; ShowSecurityInfo hWndParent, varptr(pSecurityInfo) ; 戻り値は stat
; hWndParent : HWND -> "sptr"
; pSecurityInfo : INTERNET_SECURITY_INFO* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "WININET.dll" #cfunc global ShowSecurityInfo "ShowSecurityInfo" sptr, var ; res = ShowSecurityInfo(hWndParent, pSecurityInfo) ; hWndParent : HWND -> "sptr" ; pSecurityInfo : INTERNET_SECURITY_INFO* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "WININET.dll" #cfunc global ShowSecurityInfo "ShowSecurityInfo" sptr, sptr ; res = ShowSecurityInfo(hWndParent, varptr(pSecurityInfo)) ; hWndParent : HWND -> "sptr" ; pSecurityInfo : INTERNET_SECURITY_INFO* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD ShowSecurityInfo(HWND hWndParent, INTERNET_SECURITY_INFO* pSecurityInfo) #uselib "WININET.dll" #cfunc global ShowSecurityInfo "ShowSecurityInfo" intptr, var ; res = ShowSecurityInfo(hWndParent, pSecurityInfo) ; hWndParent : HWND -> "intptr" ; pSecurityInfo : INTERNET_SECURITY_INFO* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD ShowSecurityInfo(HWND hWndParent, INTERNET_SECURITY_INFO* pSecurityInfo) #uselib "WININET.dll" #cfunc global ShowSecurityInfo "ShowSecurityInfo" intptr, intptr ; res = ShowSecurityInfo(hWndParent, varptr(pSecurityInfo)) ; hWndParent : HWND -> "intptr" ; pSecurityInfo : INTERNET_SECURITY_INFO* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wininet = windows.NewLazySystemDLL("WININET.dll")
procShowSecurityInfo = wininet.NewProc("ShowSecurityInfo")
)
// hWndParent (HWND), pSecurityInfo (INTERNET_SECURITY_INFO*)
r1, _, err := procShowSecurityInfo.Call(
uintptr(hWndParent),
uintptr(pSecurityInfo),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction ShowSecurityInfo(
hWndParent: THandle; // HWND
pSecurityInfo: Pointer // INTERNET_SECURITY_INFO*
): DWORD; stdcall;
external 'WININET.dll' name 'ShowSecurityInfo';result := DllCall("WININET\ShowSecurityInfo"
, "Ptr", hWndParent ; HWND
, "Ptr", pSecurityInfo ; INTERNET_SECURITY_INFO*
, "UInt") ; return: DWORD●ShowSecurityInfo(hWndParent, pSecurityInfo) = DLL("WININET.dll", "dword ShowSecurityInfo(void*, void*)")
# 呼び出し: ShowSecurityInfo(hWndParent, pSecurityInfo)
# hWndParent : HWND -> "void*"
# pSecurityInfo : INTERNET_SECURITY_INFO* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。