ホーム › Web.InternetExplorer › RatingAccessDeniedDialog2
RatingAccessDeniedDialog2
関数簡易版のアクセス拒否ダイアログを表示する(ANSI版)。
シグネチャ
// MSRATING.dll (ANSI / -A)
#include <windows.h>
HRESULT RatingAccessDeniedDialog2(
HWND hDlg,
LPCSTR pszUsername, // optional
void* pRatingDetails
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hDlg | HWND | in | アクセス拒否ダイアログの親となるウィンドウのハンドルを指定する。 |
| pszUsername | LPCSTR | inoptional | 対象ユーザー名を指すANSI文字列を指定する。NULL可。 |
| pRatingDetails | void* | out | RatingCheckUserAccessが返した評価詳細情報へのポインタを指定する。 |
戻り値の型: HRESULT
各言語での呼び出し定義
// MSRATING.dll (ANSI / -A)
#include <windows.h>
HRESULT RatingAccessDeniedDialog2(
HWND hDlg,
LPCSTR pszUsername, // optional
void* pRatingDetails
);[DllImport("MSRATING.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern int RatingAccessDeniedDialog2(
IntPtr hDlg, // HWND
[MarshalAs(UnmanagedType.LPStr)] string pszUsername, // LPCSTR optional
IntPtr pRatingDetails // void* out
);<DllImport("MSRATING.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function RatingAccessDeniedDialog2(
hDlg As IntPtr, ' HWND
<MarshalAs(UnmanagedType.LPStr)> pszUsername As String, ' LPCSTR optional
pRatingDetails As IntPtr ' void* out
) As Integer
End Function' hDlg : HWND
' pszUsername : LPCSTR optional
' pRatingDetails : void* out
Declare PtrSafe Function RatingAccessDeniedDialog2 Lib "msrating" ( _
ByVal hDlg As LongPtr, _
ByVal pszUsername As String, _
ByVal pRatingDetails As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RatingAccessDeniedDialog2 = ctypes.windll.msrating.RatingAccessDeniedDialog2
RatingAccessDeniedDialog2.restype = ctypes.c_int
RatingAccessDeniedDialog2.argtypes = [
wintypes.HANDLE, # hDlg : HWND
wintypes.LPCSTR, # pszUsername : LPCSTR optional
ctypes.POINTER(None), # pRatingDetails : void* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSRATING.dll')
RatingAccessDeniedDialog2 = Fiddle::Function.new(
lib['RatingAccessDeniedDialog2'],
[
Fiddle::TYPE_VOIDP, # hDlg : HWND
Fiddle::TYPE_VOIDP, # pszUsername : LPCSTR optional
Fiddle::TYPE_VOIDP, # pRatingDetails : void* out
],
Fiddle::TYPE_INT)#[link(name = "msrating")]
extern "system" {
fn RatingAccessDeniedDialog2(
hDlg: *mut core::ffi::c_void, // HWND
pszUsername: *const u8, // LPCSTR optional
pRatingDetails: *mut () // void* out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSRATING.dll", CharSet = CharSet.Ansi)]
public static extern int RatingAccessDeniedDialog2(IntPtr hDlg, [MarshalAs(UnmanagedType.LPStr)] string pszUsername, IntPtr pRatingDetails);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSRATING_RatingAccessDeniedDialog2' -Namespace Win32 -PassThru
# $api::RatingAccessDeniedDialog2(hDlg, pszUsername, pRatingDetails)#uselib "MSRATING.dll"
#func global RatingAccessDeniedDialog2 "RatingAccessDeniedDialog2" sptr, sptr, sptr
; RatingAccessDeniedDialog2 hDlg, pszUsername, pRatingDetails ; 戻り値は stat
; hDlg : HWND -> "sptr"
; pszUsername : LPCSTR optional -> "sptr"
; pRatingDetails : void* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSRATING.dll"
#cfunc global RatingAccessDeniedDialog2 "RatingAccessDeniedDialog2" sptr, str, sptr
; res = RatingAccessDeniedDialog2(hDlg, pszUsername, pRatingDetails)
; hDlg : HWND -> "sptr"
; pszUsername : LPCSTR optional -> "str"
; pRatingDetails : void* out -> "sptr"; HRESULT RatingAccessDeniedDialog2(HWND hDlg, LPCSTR pszUsername, void* pRatingDetails)
#uselib "MSRATING.dll"
#cfunc global RatingAccessDeniedDialog2 "RatingAccessDeniedDialog2" intptr, str, intptr
; res = RatingAccessDeniedDialog2(hDlg, pszUsername, pRatingDetails)
; hDlg : HWND -> "intptr"
; pszUsername : LPCSTR optional -> "str"
; pRatingDetails : void* out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msrating = windows.NewLazySystemDLL("MSRATING.dll")
procRatingAccessDeniedDialog2 = msrating.NewProc("RatingAccessDeniedDialog2")
)
// hDlg (HWND), pszUsername (LPCSTR optional), pRatingDetails (void* out)
r1, _, err := procRatingAccessDeniedDialog2.Call(
uintptr(hDlg),
uintptr(unsafe.Pointer(windows.BytePtrFromString(pszUsername))),
uintptr(pRatingDetails),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction RatingAccessDeniedDialog2(
hDlg: THandle; // HWND
pszUsername: PAnsiChar; // LPCSTR optional
pRatingDetails: Pointer // void* out
): Integer; stdcall;
external 'MSRATING.dll' name 'RatingAccessDeniedDialog2';result := DllCall("MSRATING\RatingAccessDeniedDialog2"
, "Ptr", hDlg ; HWND
, "AStr", pszUsername ; LPCSTR optional
, "Ptr", pRatingDetails ; void* out
, "Int") ; return: HRESULT●RatingAccessDeniedDialog2(hDlg, pszUsername, pRatingDetails) = DLL("MSRATING.dll", "int RatingAccessDeniedDialog2(void*, char*, void*)")
# 呼び出し: RatingAccessDeniedDialog2(hDlg, pszUsername, pRatingDetails)
# hDlg : HWND -> "void*"
# pszUsername : LPCSTR optional -> "char*"
# pRatingDetails : void* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。