ホーム › Web.MsHtml › DoPrivacyDlg
DoPrivacyDlg
関数サイトのプライバシー情報を表示するダイアログを開く。
シグネチャ
// SHDOCVW.dll
#include <windows.h>
HRESULT DoPrivacyDlg(
HWND hwndOwner, // optional
LPCWSTR pszUrl,
IEnumPrivacyRecords* pPrivacyEnum,
BOOL fReportAllSites
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hwndOwner | HWND | inoptional |
| pszUrl | LPCWSTR | in |
| pPrivacyEnum | IEnumPrivacyRecords* | in |
| fReportAllSites | BOOL | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// SHDOCVW.dll
#include <windows.h>
HRESULT DoPrivacyDlg(
HWND hwndOwner, // optional
LPCWSTR pszUrl,
IEnumPrivacyRecords* pPrivacyEnum,
BOOL fReportAllSites
);[DllImport("SHDOCVW.dll", ExactSpelling = true)]
static extern int DoPrivacyDlg(
IntPtr hwndOwner, // HWND optional
[MarshalAs(UnmanagedType.LPWStr)] string pszUrl, // LPCWSTR
IntPtr pPrivacyEnum, // IEnumPrivacyRecords*
bool fReportAllSites // BOOL
);<DllImport("SHDOCVW.dll", ExactSpelling:=True)>
Public Shared Function DoPrivacyDlg(
hwndOwner As IntPtr, ' HWND optional
<MarshalAs(UnmanagedType.LPWStr)> pszUrl As String, ' LPCWSTR
pPrivacyEnum As IntPtr, ' IEnumPrivacyRecords*
fReportAllSites As Boolean ' BOOL
) As Integer
End Function' hwndOwner : HWND optional
' pszUrl : LPCWSTR
' pPrivacyEnum : IEnumPrivacyRecords*
' fReportAllSites : BOOL
Declare PtrSafe Function DoPrivacyDlg Lib "shdocvw" ( _
ByVal hwndOwner As LongPtr, _
ByVal pszUrl As LongPtr, _
ByVal pPrivacyEnum As LongPtr, _
ByVal fReportAllSites As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DoPrivacyDlg = ctypes.windll.shdocvw.DoPrivacyDlg
DoPrivacyDlg.restype = ctypes.c_int
DoPrivacyDlg.argtypes = [
wintypes.HANDLE, # hwndOwner : HWND optional
wintypes.LPCWSTR, # pszUrl : LPCWSTR
ctypes.c_void_p, # pPrivacyEnum : IEnumPrivacyRecords*
wintypes.BOOL, # fReportAllSites : BOOL
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SHDOCVW.dll')
DoPrivacyDlg = Fiddle::Function.new(
lib['DoPrivacyDlg'],
[
Fiddle::TYPE_VOIDP, # hwndOwner : HWND optional
Fiddle::TYPE_VOIDP, # pszUrl : LPCWSTR
Fiddle::TYPE_VOIDP, # pPrivacyEnum : IEnumPrivacyRecords*
Fiddle::TYPE_INT, # fReportAllSites : BOOL
],
Fiddle::TYPE_INT)#[link(name = "shdocvw")]
extern "system" {
fn DoPrivacyDlg(
hwndOwner: *mut core::ffi::c_void, // HWND optional
pszUrl: *const u16, // LPCWSTR
pPrivacyEnum: *mut core::ffi::c_void, // IEnumPrivacyRecords*
fReportAllSites: i32 // BOOL
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("SHDOCVW.dll")]
public static extern int DoPrivacyDlg(IntPtr hwndOwner, [MarshalAs(UnmanagedType.LPWStr)] string pszUrl, IntPtr pPrivacyEnum, bool fReportAllSites);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SHDOCVW_DoPrivacyDlg' -Namespace Win32 -PassThru
# $api::DoPrivacyDlg(hwndOwner, pszUrl, pPrivacyEnum, fReportAllSites)#uselib "SHDOCVW.dll"
#func global DoPrivacyDlg "DoPrivacyDlg" sptr, sptr, sptr, sptr
; DoPrivacyDlg hwndOwner, pszUrl, pPrivacyEnum, fReportAllSites ; 戻り値は stat
; hwndOwner : HWND optional -> "sptr"
; pszUrl : LPCWSTR -> "sptr"
; pPrivacyEnum : IEnumPrivacyRecords* -> "sptr"
; fReportAllSites : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "SHDOCVW.dll"
#cfunc global DoPrivacyDlg "DoPrivacyDlg" sptr, wstr, sptr, int
; res = DoPrivacyDlg(hwndOwner, pszUrl, pPrivacyEnum, fReportAllSites)
; hwndOwner : HWND optional -> "sptr"
; pszUrl : LPCWSTR -> "wstr"
; pPrivacyEnum : IEnumPrivacyRecords* -> "sptr"
; fReportAllSites : BOOL -> "int"; HRESULT DoPrivacyDlg(HWND hwndOwner, LPCWSTR pszUrl, IEnumPrivacyRecords* pPrivacyEnum, BOOL fReportAllSites)
#uselib "SHDOCVW.dll"
#cfunc global DoPrivacyDlg "DoPrivacyDlg" intptr, wstr, intptr, int
; res = DoPrivacyDlg(hwndOwner, pszUrl, pPrivacyEnum, fReportAllSites)
; hwndOwner : HWND optional -> "intptr"
; pszUrl : LPCWSTR -> "wstr"
; pPrivacyEnum : IEnumPrivacyRecords* -> "intptr"
; fReportAllSites : BOOL -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
shdocvw = windows.NewLazySystemDLL("SHDOCVW.dll")
procDoPrivacyDlg = shdocvw.NewProc("DoPrivacyDlg")
)
// hwndOwner (HWND optional), pszUrl (LPCWSTR), pPrivacyEnum (IEnumPrivacyRecords*), fReportAllSites (BOOL)
r1, _, err := procDoPrivacyDlg.Call(
uintptr(hwndOwner),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszUrl))),
uintptr(pPrivacyEnum),
uintptr(fReportAllSites),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DoPrivacyDlg(
hwndOwner: THandle; // HWND optional
pszUrl: PWideChar; // LPCWSTR
pPrivacyEnum: Pointer; // IEnumPrivacyRecords*
fReportAllSites: BOOL // BOOL
): Integer; stdcall;
external 'SHDOCVW.dll' name 'DoPrivacyDlg';result := DllCall("SHDOCVW\DoPrivacyDlg"
, "Ptr", hwndOwner ; HWND optional
, "WStr", pszUrl ; LPCWSTR
, "Ptr", pPrivacyEnum ; IEnumPrivacyRecords*
, "Int", fReportAllSites ; BOOL
, "Int") ; return: HRESULT●DoPrivacyDlg(hwndOwner, pszUrl, pPrivacyEnum, fReportAllSites) = DLL("SHDOCVW.dll", "int DoPrivacyDlg(void*, char*, void*, bool)")
# 呼び出し: DoPrivacyDlg(hwndOwner, pszUrl, pPrivacyEnum, fReportAllSites)
# hwndOwner : HWND optional -> "void*"
# pszUrl : LPCWSTR -> "char*"
# pPrivacyEnum : IEnumPrivacyRecords* -> "void*"
# fReportAllSites : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。