ホーム › Security.Authentication.Identity › SecPkgCredentials_SSIProviderW
SecPkgCredentials_SSIProviderW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| sProviderName | WORD* | 8/4 | +0 | +0 | 資格情報が表すプロバイダーの名前を含む、null で終わる文字列へのポインターです。 |
| ProviderInfoLength | DWORD | 4 | +8 | +4 | プロバイダー情報の長さです。 |
| ProviderInfo | LPSTR | 8/4 | +16 | +8 | プロバイダー情報です。 |
公式ドキュメント
SecPkgCredentials_SSIProvider 構造体は、コンテキストに関連付けられた SSI プロバイダーの情報を保持します。 QueryCredentialsAttributes 関数はこの構造体を使用します。
解説(Remarks)
メモ
sspi.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいてこの関数の ANSI 版と Unicode 版を自動的に選択するエイリアスとして SecPkgCredentials_SSIProvider を定義しています。エンコーディングに依存しないエイリアスと、エンコーディングに依存するコードを混在させると不一致が生じ、コンパイルエラーや実行時エラーの原因となることがあります。詳細については、Conventions for Function Prototypes を参照してください。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// SecPkgCredentials_SSIProviderW (x64 24 / x86 12 バイト)
typedef struct SecPkgCredentials_SSIProviderW {
WORD* sProviderName;
DWORD ProviderInfoLength;
LPSTR ProviderInfo;
} SecPkgCredentials_SSIProviderW;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SecPkgCredentials_SSIProviderW
{
public IntPtr sProviderName;
public uint ProviderInfoLength;
public IntPtr ProviderInfo;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SecPkgCredentials_SSIProviderW
Public sProviderName As IntPtr
Public ProviderInfoLength As UInteger
Public ProviderInfo As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class SecPkgCredentials_SSIProviderW(ctypes.Structure):
_fields_ = [
("sProviderName", ctypes.c_void_p),
("ProviderInfoLength", wintypes.DWORD),
("ProviderInfo", ctypes.c_void_p),
]#[repr(C)]
pub struct SecPkgCredentials_SSIProviderW {
pub sProviderName: *mut core::ffi::c_void,
pub ProviderInfoLength: u32,
pub ProviderInfo: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type SecPkgCredentials_SSIProviderW struct {
sProviderName uintptr
ProviderInfoLength uint32
ProviderInfo uintptr
}type
SecPkgCredentials_SSIProviderW = record
sProviderName: Pointer;
ProviderInfoLength: DWORD;
ProviderInfo: Pointer;
end;const SecPkgCredentials_SSIProviderW = extern struct {
sProviderName: ?*anyopaque,
ProviderInfoLength: u32,
ProviderInfo: ?*anyopaque,
};type
SecPkgCredentials_SSIProviderW {.bycopy.} = object
sProviderName: pointer
ProviderInfoLength: uint32
ProviderInfo: pointerstruct SecPkgCredentials_SSIProviderW
{
void* sProviderName;
uint ProviderInfoLength;
void* ProviderInfo;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SecPkgCredentials_SSIProviderW サイズ: 12 バイト(x86)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; sProviderName : WORD* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ProviderInfoLength : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ProviderInfo : LPSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SecPkgCredentials_SSIProviderW サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; sProviderName : WORD* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; ProviderInfoLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ProviderInfo : LPSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SecPkgCredentials_SSIProviderW
#field intptr sProviderName
#field int ProviderInfoLength
#field intptr ProviderInfo
#endstruct
stdim st, SecPkgCredentials_SSIProviderW ; NSTRUCT 変数を確保
st->ProviderInfoLength = 100
mes "ProviderInfoLength=" + st->ProviderInfoLength