ホーム › Media.MediaFoundation › MFNetCredentialManagerGetParam
MFNetCredentialManagerGetParam
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| hrOp | HRESULT | 4 | +0 | +0 | 認証チャレンジの応答コードです。たとえば NS_E_PROXY_ACCESSDENIED です。 |
| fAllowLoggedOnUser | BOOL | 4 | +4 | +4 | 現在ログオンしているユーザーの資格情報を既定の資格情報として使用する場合は、このフラグを TRUE に設定します。 |
| fClearTextPackage | BOOL | 4 | +8 | +8 | TRUE の場合、認証パッケージは暗号化されていない資格情報をネットワーク経由で送信します。それ以外の場合、認証パッケージは資格情報を暗号化します。 |
| pszUrl | LPWSTR | 8/4 | +16 | +12 | 認証を必要とする元の URL です。 |
| pszSite | LPWSTR | 8/4 | +24 | +16 | 認証を必要とするサイトまたはプロキシの名前です。 |
| pszRealm | LPWSTR | 8/4 | +32 | +20 | この認証のレルムの名前です。 |
| pszPackage | LPWSTR | 8/4 | +40 | +24 | 認証パッケージの名前です。たとえば "Digest" や "MBS_BASIC" です。 |
| nRetries | INT | 4 | +48 | +28 | 認証に失敗した場合に資格情報マネージャーが再試行する回数です。 |
公式ドキュメント
資格情報マネージャー用の認証情報を格納します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// MFNetCredentialManagerGetParam (x64 56 / x86 32 バイト)
typedef struct MFNetCredentialManagerGetParam {
HRESULT hrOp;
BOOL fAllowLoggedOnUser;
BOOL fClearTextPackage;
LPWSTR pszUrl;
LPWSTR pszSite;
LPWSTR pszRealm;
LPWSTR pszPackage;
INT nRetries;
} MFNetCredentialManagerGetParam;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MFNetCredentialManagerGetParam
{
public int hrOp;
[MarshalAs(UnmanagedType.Bool)] public bool fAllowLoggedOnUser;
[MarshalAs(UnmanagedType.Bool)] public bool fClearTextPackage;
public IntPtr pszUrl;
public IntPtr pszSite;
public IntPtr pszRealm;
public IntPtr pszPackage;
public int nRetries;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MFNetCredentialManagerGetParam
Public hrOp As Integer
<MarshalAs(UnmanagedType.Bool)> Public fAllowLoggedOnUser As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fClearTextPackage As Boolean
Public pszUrl As IntPtr
Public pszSite As IntPtr
Public pszRealm As IntPtr
Public pszPackage As IntPtr
Public nRetries As Integer
End Structureimport ctypes
from ctypes import wintypes
class MFNetCredentialManagerGetParam(ctypes.Structure):
_fields_ = [
("hrOp", ctypes.c_int),
("fAllowLoggedOnUser", wintypes.BOOL),
("fClearTextPackage", wintypes.BOOL),
("pszUrl", ctypes.c_void_p),
("pszSite", ctypes.c_void_p),
("pszRealm", ctypes.c_void_p),
("pszPackage", ctypes.c_void_p),
("nRetries", ctypes.c_int),
]#[repr(C)]
pub struct MFNetCredentialManagerGetParam {
pub hrOp: i32,
pub fAllowLoggedOnUser: i32,
pub fClearTextPackage: i32,
pub pszUrl: *mut core::ffi::c_void,
pub pszSite: *mut core::ffi::c_void,
pub pszRealm: *mut core::ffi::c_void,
pub pszPackage: *mut core::ffi::c_void,
pub nRetries: i32,
}import "golang.org/x/sys/windows"
type MFNetCredentialManagerGetParam struct {
hrOp int32
fAllowLoggedOnUser int32
fClearTextPackage int32
pszUrl uintptr
pszSite uintptr
pszRealm uintptr
pszPackage uintptr
nRetries int32
}type
MFNetCredentialManagerGetParam = record
hrOp: Integer;
fAllowLoggedOnUser: BOOL;
fClearTextPackage: BOOL;
pszUrl: Pointer;
pszSite: Pointer;
pszRealm: Pointer;
pszPackage: Pointer;
nRetries: Integer;
end;const MFNetCredentialManagerGetParam = extern struct {
hrOp: i32,
fAllowLoggedOnUser: i32,
fClearTextPackage: i32,
pszUrl: ?*anyopaque,
pszSite: ?*anyopaque,
pszRealm: ?*anyopaque,
pszPackage: ?*anyopaque,
nRetries: i32,
};type
MFNetCredentialManagerGetParam {.bycopy.} = object
hrOp: int32
fAllowLoggedOnUser: int32
fClearTextPackage: int32
pszUrl: pointer
pszSite: pointer
pszRealm: pointer
pszPackage: pointer
nRetries: int32struct MFNetCredentialManagerGetParam
{
int hrOp;
int fAllowLoggedOnUser;
int fClearTextPackage;
void* pszUrl;
void* pszSite;
void* pszRealm;
void* pszPackage;
int nRetries;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MFNetCredentialManagerGetParam サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; hrOp : HRESULT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fAllowLoggedOnUser : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fClearTextPackage : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pszUrl : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pszSite : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pszRealm : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; pszPackage : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; nRetries : INT (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MFNetCredentialManagerGetParam サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; hrOp : HRESULT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fAllowLoggedOnUser : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fClearTextPackage : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pszUrl : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszSite : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pszRealm : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pszPackage : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; nRetries : INT (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MFNetCredentialManagerGetParam
#field int hrOp
#field bool fAllowLoggedOnUser
#field bool fClearTextPackage
#field intptr pszUrl
#field intptr pszSite
#field intptr pszRealm
#field intptr pszPackage
#field int nRetries
#endstruct
stdim st, MFNetCredentialManagerGetParam ; NSTRUCT 変数を確保
st->hrOp = 100
mes "hrOp=" + st->hrOp