Win32 API 日本語リファレンス
ホームMedia.MediaFoundation › MFNetCredentialManagerGetParam

MFNetCredentialManagerGetParam

構造体
サイズx64: 56 バイト / x86: 32 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
hrOpHRESULT4+0+0認証操作の結果を示すHRESULT。
fAllowLoggedOnUserBOOL4+4+4ログオン中ユーザーの資格情報利用を許可するか否かを示すフラグ。
fClearTextPackageBOOL4+8+8認証パッケージが資格情報を平文で送るか否かを示すフラグ。
pszUrlLPWSTR8/4+16+12認証対象のURLを示すワイド文字列。
pszSiteLPWSTR8/4+24+16認証対象のサイト名を示すワイド文字列。
pszRealmLPWSTR8/4+32+20認証レルム名を示すワイド文字列。
pszPackageLPWSTR8/4+40+24使用する認証パッケージ名を示すワイド文字列。
nRetriesINT4+48+28残りの認証再試行回数。

各言語での定義

#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 Structure
import 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: int32
struct 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