ホーム › Networking.WinInet › InternetConfirmZoneCrossingA
InternetConfirmZoneCrossingA
関数セキュリティゾーン間の移動をユーザーに確認する(ANSI版)。
シグネチャ
// WININET.dll (ANSI / -A)
#include <windows.h>
DWORD InternetConfirmZoneCrossingA(
HWND hWnd,
LPSTR szUrlPrev,
LPSTR szUrlNew,
BOOL bPost
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWnd | HWND | in |
| szUrlPrev | LPSTR | in |
| szUrlNew | LPSTR | in |
| bPost | BOOL | in |
戻り値の型: DWORD
各言語での呼び出し定義
// WININET.dll (ANSI / -A)
#include <windows.h>
DWORD InternetConfirmZoneCrossingA(
HWND hWnd,
LPSTR szUrlPrev,
LPSTR szUrlNew,
BOOL bPost
);[DllImport("WININET.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern uint InternetConfirmZoneCrossingA(
IntPtr hWnd, // HWND
[MarshalAs(UnmanagedType.LPStr)] string szUrlPrev, // LPSTR
[MarshalAs(UnmanagedType.LPStr)] string szUrlNew, // LPSTR
bool bPost // BOOL
);<DllImport("WININET.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function InternetConfirmZoneCrossingA(
hWnd As IntPtr, ' HWND
<MarshalAs(UnmanagedType.LPStr)> szUrlPrev As String, ' LPSTR
<MarshalAs(UnmanagedType.LPStr)> szUrlNew As String, ' LPSTR
bPost As Boolean ' BOOL
) As UInteger
End Function' hWnd : HWND
' szUrlPrev : LPSTR
' szUrlNew : LPSTR
' bPost : BOOL
Declare PtrSafe Function InternetConfirmZoneCrossingA Lib "wininet" ( _
ByVal hWnd As LongPtr, _
ByVal szUrlPrev As String, _
ByVal szUrlNew As String, _
ByVal bPost As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
InternetConfirmZoneCrossingA = ctypes.windll.wininet.InternetConfirmZoneCrossingA
InternetConfirmZoneCrossingA.restype = wintypes.DWORD
InternetConfirmZoneCrossingA.argtypes = [
wintypes.HANDLE, # hWnd : HWND
wintypes.LPCSTR, # szUrlPrev : LPSTR
wintypes.LPCSTR, # szUrlNew : LPSTR
wintypes.BOOL, # bPost : BOOL
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WININET.dll')
InternetConfirmZoneCrossingA = Fiddle::Function.new(
lib['InternetConfirmZoneCrossingA'],
[
Fiddle::TYPE_VOIDP, # hWnd : HWND
Fiddle::TYPE_VOIDP, # szUrlPrev : LPSTR
Fiddle::TYPE_VOIDP, # szUrlNew : LPSTR
Fiddle::TYPE_INT, # bPost : BOOL
],
-Fiddle::TYPE_INT)#[link(name = "wininet")]
extern "system" {
fn InternetConfirmZoneCrossingA(
hWnd: *mut core::ffi::c_void, // HWND
szUrlPrev: *mut u8, // LPSTR
szUrlNew: *mut u8, // LPSTR
bPost: i32 // BOOL
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("WININET.dll", CharSet = CharSet.Ansi)]
public static extern uint InternetConfirmZoneCrossingA(IntPtr hWnd, [MarshalAs(UnmanagedType.LPStr)] string szUrlPrev, [MarshalAs(UnmanagedType.LPStr)] string szUrlNew, bool bPost);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_InternetConfirmZoneCrossingA' -Namespace Win32 -PassThru
# $api::InternetConfirmZoneCrossingA(hWnd, szUrlPrev, szUrlNew, bPost)#uselib "WININET.dll"
#func global InternetConfirmZoneCrossingA "InternetConfirmZoneCrossingA" sptr, sptr, sptr, sptr
; InternetConfirmZoneCrossingA hWnd, szUrlPrev, szUrlNew, bPost ; 戻り値は stat
; hWnd : HWND -> "sptr"
; szUrlPrev : LPSTR -> "sptr"
; szUrlNew : LPSTR -> "sptr"
; bPost : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "WININET.dll"
#cfunc global InternetConfirmZoneCrossingA "InternetConfirmZoneCrossingA" sptr, str, str, int
; res = InternetConfirmZoneCrossingA(hWnd, szUrlPrev, szUrlNew, bPost)
; hWnd : HWND -> "sptr"
; szUrlPrev : LPSTR -> "str"
; szUrlNew : LPSTR -> "str"
; bPost : BOOL -> "int"; DWORD InternetConfirmZoneCrossingA(HWND hWnd, LPSTR szUrlPrev, LPSTR szUrlNew, BOOL bPost)
#uselib "WININET.dll"
#cfunc global InternetConfirmZoneCrossingA "InternetConfirmZoneCrossingA" intptr, str, str, int
; res = InternetConfirmZoneCrossingA(hWnd, szUrlPrev, szUrlNew, bPost)
; hWnd : HWND -> "intptr"
; szUrlPrev : LPSTR -> "str"
; szUrlNew : LPSTR -> "str"
; bPost : BOOL -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wininet = windows.NewLazySystemDLL("WININET.dll")
procInternetConfirmZoneCrossingA = wininet.NewProc("InternetConfirmZoneCrossingA")
)
// hWnd (HWND), szUrlPrev (LPSTR), szUrlNew (LPSTR), bPost (BOOL)
r1, _, err := procInternetConfirmZoneCrossingA.Call(
uintptr(hWnd),
uintptr(unsafe.Pointer(windows.BytePtrFromString(szUrlPrev))),
uintptr(unsafe.Pointer(windows.BytePtrFromString(szUrlNew))),
uintptr(bPost),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction InternetConfirmZoneCrossingA(
hWnd: THandle; // HWND
szUrlPrev: PAnsiChar; // LPSTR
szUrlNew: PAnsiChar; // LPSTR
bPost: BOOL // BOOL
): DWORD; stdcall;
external 'WININET.dll' name 'InternetConfirmZoneCrossingA';result := DllCall("WININET\InternetConfirmZoneCrossingA"
, "Ptr", hWnd ; HWND
, "AStr", szUrlPrev ; LPSTR
, "AStr", szUrlNew ; LPSTR
, "Int", bPost ; BOOL
, "UInt") ; return: DWORD●InternetConfirmZoneCrossingA(hWnd, szUrlPrev, szUrlNew, bPost) = DLL("WININET.dll", "dword InternetConfirmZoneCrossingA(void*, char*, char*, bool)")
# 呼び出し: InternetConfirmZoneCrossingA(hWnd, szUrlPrev, szUrlNew, bPost)
# hWnd : HWND -> "void*"
# szUrlPrev : LPSTR -> "char*"
# szUrlNew : LPSTR -> "char*"
# bPost : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。