Win32 API 日本語リファレンス
ホームNetworking.WinInet › InternetShowSecurityInfoByURLA

InternetShowSecurityInfoByURLA

関数
指定URLのセキュリティ情報ダイアログを表示する。
DLLWININET.dll文字セットANSI (-A)呼出規約winapi

シグネチャ

// WININET.dll  (ANSI / -A)
#include <windows.h>

BOOL InternetShowSecurityInfoByURLA(
    LPSTR lpszURL,
    HWND hwndParent
);

パラメーター

名前方向
lpszURLLPSTRin
hwndParentHWNDin

戻り値の型: BOOL

各言語での呼び出し定義

// WININET.dll  (ANSI / -A)
#include <windows.h>

BOOL InternetShowSecurityInfoByURLA(
    LPSTR lpszURL,
    HWND hwndParent
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern bool InternetShowSecurityInfoByURLA(
    [MarshalAs(UnmanagedType.LPStr)] string lpszURL,   // LPSTR
    IntPtr hwndParent   // HWND
);
<DllImport("WININET.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function InternetShowSecurityInfoByURLA(
    <MarshalAs(UnmanagedType.LPStr)> lpszURL As String,   ' LPSTR
    hwndParent As IntPtr   ' HWND
) As Boolean
End Function
' lpszURL : LPSTR
' hwndParent : HWND
Declare PtrSafe Function InternetShowSecurityInfoByURLA Lib "wininet" ( _
    ByVal lpszURL As String, _
    ByVal hwndParent As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

InternetShowSecurityInfoByURLA = ctypes.windll.wininet.InternetShowSecurityInfoByURLA
InternetShowSecurityInfoByURLA.restype = wintypes.BOOL
InternetShowSecurityInfoByURLA.argtypes = [
    wintypes.LPCSTR,  # lpszURL : LPSTR
    wintypes.HANDLE,  # hwndParent : HWND
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WININET.dll')
InternetShowSecurityInfoByURLA = Fiddle::Function.new(
  lib['InternetShowSecurityInfoByURLA'],
  [
    Fiddle::TYPE_VOIDP,  # lpszURL : LPSTR
    Fiddle::TYPE_VOIDP,  # hwndParent : HWND
  ],
  Fiddle::TYPE_INT)
#[link(name = "wininet")]
extern "system" {
    fn InternetShowSecurityInfoByURLA(
        lpszURL: *mut u8,  // LPSTR
        hwndParent: *mut core::ffi::c_void  // HWND
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll", CharSet = CharSet.Ansi)]
public static extern bool InternetShowSecurityInfoByURLA([MarshalAs(UnmanagedType.LPStr)] string lpszURL, IntPtr hwndParent);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_InternetShowSecurityInfoByURLA' -Namespace Win32 -PassThru
# $api::InternetShowSecurityInfoByURLA(lpszURL, hwndParent)
#uselib "WININET.dll"
#func global InternetShowSecurityInfoByURLA "InternetShowSecurityInfoByURLA" sptr, sptr
; InternetShowSecurityInfoByURLA lpszURL, hwndParent   ; 戻り値は stat
; lpszURL : LPSTR -> "sptr"
; hwndParent : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "WININET.dll"
#cfunc global InternetShowSecurityInfoByURLA "InternetShowSecurityInfoByURLA" str, sptr
; res = InternetShowSecurityInfoByURLA(lpszURL, hwndParent)
; lpszURL : LPSTR -> "str"
; hwndParent : HWND -> "sptr"
; BOOL InternetShowSecurityInfoByURLA(LPSTR lpszURL, HWND hwndParent)
#uselib "WININET.dll"
#cfunc global InternetShowSecurityInfoByURLA "InternetShowSecurityInfoByURLA" str, intptr
; res = InternetShowSecurityInfoByURLA(lpszURL, hwndParent)
; lpszURL : LPSTR -> "str"
; hwndParent : HWND -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wininet = windows.NewLazySystemDLL("WININET.dll")
	procInternetShowSecurityInfoByURLA = wininet.NewProc("InternetShowSecurityInfoByURLA")
)

// lpszURL (LPSTR), hwndParent (HWND)
r1, _, err := procInternetShowSecurityInfoByURLA.Call(
	uintptr(unsafe.Pointer(windows.BytePtrFromString(lpszURL))),
	uintptr(hwndParent),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function InternetShowSecurityInfoByURLA(
  lpszURL: PAnsiChar;   // LPSTR
  hwndParent: THandle   // HWND
): BOOL; stdcall;
  external 'WININET.dll' name 'InternetShowSecurityInfoByURLA';
result := DllCall("WININET\InternetShowSecurityInfoByURLA"
    , "AStr", lpszURL   ; LPSTR
    , "Ptr", hwndParent   ; HWND
    , "Int")   ; return: BOOL
●InternetShowSecurityInfoByURLA(lpszURL, hwndParent) = DLL("WININET.dll", "bool InternetShowSecurityInfoByURLA(char*, void*)")
# 呼び出し: InternetShowSecurityInfoByURLA(lpszURL, hwndParent)
# lpszURL : LPSTR -> "char*"
# hwndParent : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。