ホーム › Networking.WinInet › InternetShowSecurityInfoByURL
InternetShowSecurityInfoByURL
関数指定URLのセキュリティ情報ダイアログを表示する。
シグネチャ
// WININET.dll (ANSI / -A)
#include <windows.h>
BOOL InternetShowSecurityInfoByURL(
LPSTR lpszURL,
HWND hwndParent
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| lpszURL | LPSTR | in |
| hwndParent | HWND | in |
戻り値の型: BOOL
各言語での呼び出し定義
// WININET.dll (ANSI / -A)
#include <windows.h>
BOOL InternetShowSecurityInfoByURL(
LPSTR lpszURL,
HWND hwndParent
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern bool InternetShowSecurityInfoByURL(
[MarshalAs(UnmanagedType.LPStr)] string lpszURL, // LPSTR
IntPtr hwndParent // HWND
);<DllImport("WININET.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function InternetShowSecurityInfoByURL(
<MarshalAs(UnmanagedType.LPStr)> lpszURL As String, ' LPSTR
hwndParent As IntPtr ' HWND
) As Boolean
End Function' lpszURL : LPSTR
' hwndParent : HWND
Declare PtrSafe Function InternetShowSecurityInfoByURL 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
InternetShowSecurityInfoByURL = ctypes.windll.wininet.InternetShowSecurityInfoByURL
InternetShowSecurityInfoByURL.restype = wintypes.BOOL
InternetShowSecurityInfoByURL.argtypes = [
wintypes.LPCSTR, # lpszURL : LPSTR
wintypes.HANDLE, # hwndParent : HWND
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WININET.dll')
InternetShowSecurityInfoByURL = Fiddle::Function.new(
lib['InternetShowSecurityInfoByURL'],
[
Fiddle::TYPE_VOIDP, # lpszURL : LPSTR
Fiddle::TYPE_VOIDP, # hwndParent : HWND
],
Fiddle::TYPE_INT)#[link(name = "wininet")]
extern "system" {
fn InternetShowSecurityInfoByURL(
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 InternetShowSecurityInfoByURL([MarshalAs(UnmanagedType.LPStr)] string lpszURL, IntPtr hwndParent);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_InternetShowSecurityInfoByURL' -Namespace Win32 -PassThru
# $api::InternetShowSecurityInfoByURL(lpszURL, hwndParent)#uselib "WININET.dll"
#func global InternetShowSecurityInfoByURL "InternetShowSecurityInfoByURL" sptr, sptr
; InternetShowSecurityInfoByURL lpszURL, hwndParent ; 戻り値は stat
; lpszURL : LPSTR -> "sptr"
; hwndParent : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "WININET.dll"
#cfunc global InternetShowSecurityInfoByURL "InternetShowSecurityInfoByURL" str, sptr
; res = InternetShowSecurityInfoByURL(lpszURL, hwndParent)
; lpszURL : LPSTR -> "str"
; hwndParent : HWND -> "sptr"; BOOL InternetShowSecurityInfoByURL(LPSTR lpszURL, HWND hwndParent)
#uselib "WININET.dll"
#cfunc global InternetShowSecurityInfoByURL "InternetShowSecurityInfoByURL" str, intptr
; res = InternetShowSecurityInfoByURL(lpszURL, hwndParent)
; lpszURL : LPSTR -> "str"
; hwndParent : HWND -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wininet = windows.NewLazySystemDLL("WININET.dll")
procInternetShowSecurityInfoByURL = wininet.NewProc("InternetShowSecurityInfoByURL")
)
// lpszURL (LPSTR), hwndParent (HWND)
r1, _, err := procInternetShowSecurityInfoByURL.Call(
uintptr(unsafe.Pointer(windows.BytePtrFromString(lpszURL))),
uintptr(hwndParent),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction InternetShowSecurityInfoByURL(
lpszURL: PAnsiChar; // LPSTR
hwndParent: THandle // HWND
): BOOL; stdcall;
external 'WININET.dll' name 'InternetShowSecurityInfoByURL';result := DllCall("WININET\InternetShowSecurityInfoByURL"
, "AStr", lpszURL ; LPSTR
, "Ptr", hwndParent ; HWND
, "Int") ; return: BOOL●InternetShowSecurityInfoByURL(lpszURL, hwndParent) = DLL("WININET.dll", "bool InternetShowSecurityInfoByURL(char*, void*)")
# 呼び出し: InternetShowSecurityInfoByURL(lpszURL, hwndParent)
# lpszURL : LPSTR -> "char*"
# hwndParent : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。