Win32 API 日本語リファレンス
ホームSecurity.Authentication.Identity › SecurityFunctionTableA

SecurityFunctionTableA

構造体
サイズx64: 256 バイト / x86: 128 バイト

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

フィールド

フィールドサイズx64x86説明
dwVersionDWORD4+0+0テーブルのバージョン番号です。
EnumerateSecurityPackagesAENUMERATE_SECURITY_PACKAGES_FN_A8/4+8+4利用可能なセキュリティパッケージを列挙する関数へのポインタ(ANSI)。
QueryCredentialsAttributesAQUERY_CREDENTIALS_ATTRIBUTES_FN_A8/4+16+8資格情報の属性を問い合わせる関数へのポインタ(ANSI)。
AcquireCredentialsHandleAACQUIRE_CREDENTIALS_HANDLE_FN_A8/4+24+12資格情報ハンドルを取得する関数へのポインタ(ANSI)。
FreeCredentialsHandleFREE_CREDENTIALS_HANDLE_FN8/4+32+16資格情報ハンドルを解放する関数へのポインタ。
Reserved2void*8/4+40+20将来使用するために予約されています。
InitializeSecurityContextAINITIALIZE_SECURITY_CONTEXT_FN_A8/4+48+24クライアント側のセキュリティコンテキストを初期化する関数へのポインタ(ANSI)。
AcceptSecurityContextACCEPT_SECURITY_CONTEXT_FN8/4+56+28AcceptSecurityContext (General) 関数へのポインターです。
CompleteAuthTokenCOMPLETE_AUTH_TOKEN_FN8/4+64+32CompleteAuthToken 関数へのポインターです。
DeleteSecurityContextDELETE_SECURITY_CONTEXT_FN8/4+72+36DeleteSecurityContext 関数へのポインターです。
ApplyControlTokenAPPLY_CONTROL_TOKEN_FN8/4+80+40ApplyControlToken 関数へのポインターです。
QueryContextAttributesAQUERY_CONTEXT_ATTRIBUTES_FN_A8/4+88+44セキュリティコンテキストの属性を問い合わせる関数へのポインタ(ANSI)。
ImpersonateSecurityContextIMPERSONATE_SECURITY_CONTEXT_FN8/4+96+48ImpersonateSecurityContext 関数へのポインターです。
RevertSecurityContextREVERT_SECURITY_CONTEXT_FN8/4+104+52RevertSecurityContext 関数へのポインターです。
MakeSignatureMAKE_SIGNATURE_FN8/4+112+56MakeSignature 関数へのポインターです。
VerifySignatureVERIFY_SIGNATURE_FN8/4+120+60VerifySignature 関数へのポインターです。
FreeContextBufferFREE_CONTEXT_BUFFER_FN8/4+128+64FreeContextBuffer 関数へのポインターです。
QuerySecurityPackageInfoAQUERY_SECURITY_PACKAGE_INFO_FN_A8/4+136+68セキュリティパッケージ情報を問い合わせる関数へのポインタ(ANSI)。
Reserved3void*8/4+144+72将来使用するために予約されています。
Reserved4void*8/4+152+76将来使用するために予約されています。
ExportSecurityContextEXPORT_SECURITY_CONTEXT_FN8/4+160+80ExportSecurityContext 関数へのポインターです。
ImportSecurityContextAIMPORT_SECURITY_CONTEXT_FN_A8/4+168+84セキュリティコンテキストをインポートする関数へのポインタ(ANSI)。
AddCredentialsAADD_CREDENTIALS_FN_A8/4+176+88既存の資格情報ハンドルへ資格情報を追加する関数へのポインタ(ANSI)。
Reserved8void*8/4+184+92将来使用するために予約されています。
QuerySecurityContextTokenQUERY_SECURITY_CONTEXT_TOKEN_FN8/4+192+96QuerySecurityContextToken 関数へのポインターです。
EncryptMessageENCRYPT_MESSAGE_FN8/4+200+100EncryptMessage (General) 関数へのポインターです。
DecryptMessageDECRYPT_MESSAGE_FN8/4+208+104DecryptMessage (General) 関数へのポインターです。
SetContextAttributesASET_CONTEXT_ATTRIBUTES_FN_A8/4+216+108セキュリティコンテキストの属性を設定する関数へのポインタ(ANSI)。
SetCredentialsAttributesASET_CREDENTIALS_ATTRIBUTES_FN_A8/4+224+112資格情報の属性を設定する関数へのポインタ(ANSI)。
ChangeAccountPasswordACHANGE_PASSWORD_FN_A8/4+232+116アカウントのパスワードを変更する関数へのポインタ(ANSI)。
QueryContextAttributesExAQUERY_CONTEXT_ATTRIBUTES_EX_FN_A8/4+240+120拡張版のコンテキスト属性問い合わせ関数へのポインタ(ANSI)。
QueryCredentialsAttributesExAQUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A8/4+248+124

- AcquireCredentialsHandle

AcquireCredentialsHandle 関数へのポインターです。

- AddCredentials

AddCredential 関数へのポインターです。

- EnumerateSecurityPackages

EnumerateSecurityPackages 関数へのポインターです。

- FreeCredentialsHandle

FreeCredentialsHandle 関数へのポインターです。

- ImportSecurityContext

ImportSecurityContext 関数へのポインターです。

- InitializeSecurityContext

InitializeSecurityContext (General) 関数へのポインターです。

- QueryContextAttributes

QueryContextAttributes (General) 関数へのポインターです。

- QueryCredentialsAttributes

QueryCredentialsAttributes 関数へのポインターです。

- QuerySecurityPackageInfo

QuerySecurityPackageInfo 関数へのポインターです。

- Reserved1

将来使用するために予約されています。

- SetContextAttributes

SetContextAttributes 関数へのポインターです。

公式ドキュメント

SecurityFunctionTable 構造体は、SSPI で定義されている関数へのポインターを格納したディスパッチテーブルです。

解説(Remarks)

メモ

sspi.h ヘッダーは、UNICODE プリプロセッサー定数の定義に基づいて、この関数の ANSI 版と Unicode 版を自動的に選択するエイリアスとして SecurityFunctionTable を定義します。エンコードに依存しないエイリアスと、エンコードに依存するコードを混在させて使用すると、不一致が生じ、コンパイルエラーや実行時エラーの原因となることがあります。詳細については、Conventions for Function Prototypes を参照してください。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// SecurityFunctionTableA  (x64 256 / x86 128 バイト)
typedef struct SecurityFunctionTableA {
    DWORD dwVersion;
    ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
    QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
    ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
    FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
    void* Reserved2;
    INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA;
    ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
    COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
    DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
    APPLY_CONTROL_TOKEN_FN ApplyControlToken;
    QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA;
    IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
    REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
    MAKE_SIGNATURE_FN MakeSignature;
    VERIFY_SIGNATURE_FN VerifySignature;
    FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
    QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA;
    void* Reserved3;
    void* Reserved4;
    EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
    IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA;
    ADD_CREDENTIALS_FN_A AddCredentialsA;
    void* Reserved8;
    QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
    ENCRYPT_MESSAGE_FN EncryptMessage;
    DECRYPT_MESSAGE_FN DecryptMessage;
    SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA;
    SET_CREDENTIALS_ATTRIBUTES_FN_A SetCredentialsAttributesA;
    CHANGE_PASSWORD_FN_A ChangeAccountPasswordA;
    QUERY_CONTEXT_ATTRIBUTES_EX_FN_A QueryContextAttributesExA;
    QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A QueryCredentialsAttributesExA;
} SecurityFunctionTableA;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SecurityFunctionTableA
{
    public uint dwVersion;
    public IntPtr EnumerateSecurityPackagesA;
    public IntPtr QueryCredentialsAttributesA;
    public IntPtr AcquireCredentialsHandleA;
    public IntPtr FreeCredentialsHandle;
    public IntPtr Reserved2;
    public IntPtr InitializeSecurityContextA;
    public IntPtr AcceptSecurityContext;
    public IntPtr CompleteAuthToken;
    public IntPtr DeleteSecurityContext;
    public IntPtr ApplyControlToken;
    public IntPtr QueryContextAttributesA;
    public IntPtr ImpersonateSecurityContext;
    public IntPtr RevertSecurityContext;
    public IntPtr MakeSignature;
    public IntPtr VerifySignature;
    public IntPtr FreeContextBuffer;
    public IntPtr QuerySecurityPackageInfoA;
    public IntPtr Reserved3;
    public IntPtr Reserved4;
    public IntPtr ExportSecurityContext;
    public IntPtr ImportSecurityContextA;
    public IntPtr AddCredentialsA;
    public IntPtr Reserved8;
    public IntPtr QuerySecurityContextToken;
    public IntPtr EncryptMessage;
    public IntPtr DecryptMessage;
    public IntPtr SetContextAttributesA;
    public IntPtr SetCredentialsAttributesA;
    public IntPtr ChangeAccountPasswordA;
    public IntPtr QueryContextAttributesExA;
    public IntPtr QueryCredentialsAttributesExA;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SecurityFunctionTableA
    Public dwVersion As UInteger
    Public EnumerateSecurityPackagesA As IntPtr
    Public QueryCredentialsAttributesA As IntPtr
    Public AcquireCredentialsHandleA As IntPtr
    Public FreeCredentialsHandle As IntPtr
    Public Reserved2 As IntPtr
    Public InitializeSecurityContextA As IntPtr
    Public AcceptSecurityContext As IntPtr
    Public CompleteAuthToken As IntPtr
    Public DeleteSecurityContext As IntPtr
    Public ApplyControlToken As IntPtr
    Public QueryContextAttributesA As IntPtr
    Public ImpersonateSecurityContext As IntPtr
    Public RevertSecurityContext As IntPtr
    Public MakeSignature As IntPtr
    Public VerifySignature As IntPtr
    Public FreeContextBuffer As IntPtr
    Public QuerySecurityPackageInfoA As IntPtr
    Public Reserved3 As IntPtr
    Public Reserved4 As IntPtr
    Public ExportSecurityContext As IntPtr
    Public ImportSecurityContextA As IntPtr
    Public AddCredentialsA As IntPtr
    Public Reserved8 As IntPtr
    Public QuerySecurityContextToken As IntPtr
    Public EncryptMessage As IntPtr
    Public DecryptMessage As IntPtr
    Public SetContextAttributesA As IntPtr
    Public SetCredentialsAttributesA As IntPtr
    Public ChangeAccountPasswordA As IntPtr
    Public QueryContextAttributesExA As IntPtr
    Public QueryCredentialsAttributesExA As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class SecurityFunctionTableA(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("EnumerateSecurityPackagesA", ctypes.c_void_p),
        ("QueryCredentialsAttributesA", ctypes.c_void_p),
        ("AcquireCredentialsHandleA", ctypes.c_void_p),
        ("FreeCredentialsHandle", ctypes.c_void_p),
        ("Reserved2", ctypes.c_void_p),
        ("InitializeSecurityContextA", ctypes.c_void_p),
        ("AcceptSecurityContext", ctypes.c_void_p),
        ("CompleteAuthToken", ctypes.c_void_p),
        ("DeleteSecurityContext", ctypes.c_void_p),
        ("ApplyControlToken", ctypes.c_void_p),
        ("QueryContextAttributesA", ctypes.c_void_p),
        ("ImpersonateSecurityContext", ctypes.c_void_p),
        ("RevertSecurityContext", ctypes.c_void_p),
        ("MakeSignature", ctypes.c_void_p),
        ("VerifySignature", ctypes.c_void_p),
        ("FreeContextBuffer", ctypes.c_void_p),
        ("QuerySecurityPackageInfoA", ctypes.c_void_p),
        ("Reserved3", ctypes.c_void_p),
        ("Reserved4", ctypes.c_void_p),
        ("ExportSecurityContext", ctypes.c_void_p),
        ("ImportSecurityContextA", ctypes.c_void_p),
        ("AddCredentialsA", ctypes.c_void_p),
        ("Reserved8", ctypes.c_void_p),
        ("QuerySecurityContextToken", ctypes.c_void_p),
        ("EncryptMessage", ctypes.c_void_p),
        ("DecryptMessage", ctypes.c_void_p),
        ("SetContextAttributesA", ctypes.c_void_p),
        ("SetCredentialsAttributesA", ctypes.c_void_p),
        ("ChangeAccountPasswordA", ctypes.c_void_p),
        ("QueryContextAttributesExA", ctypes.c_void_p),
        ("QueryCredentialsAttributesExA", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct SecurityFunctionTableA {
    pub dwVersion: u32,
    pub EnumerateSecurityPackagesA: *mut core::ffi::c_void,
    pub QueryCredentialsAttributesA: *mut core::ffi::c_void,
    pub AcquireCredentialsHandleA: *mut core::ffi::c_void,
    pub FreeCredentialsHandle: *mut core::ffi::c_void,
    pub Reserved2: *mut core::ffi::c_void,
    pub InitializeSecurityContextA: *mut core::ffi::c_void,
    pub AcceptSecurityContext: *mut core::ffi::c_void,
    pub CompleteAuthToken: *mut core::ffi::c_void,
    pub DeleteSecurityContext: *mut core::ffi::c_void,
    pub ApplyControlToken: *mut core::ffi::c_void,
    pub QueryContextAttributesA: *mut core::ffi::c_void,
    pub ImpersonateSecurityContext: *mut core::ffi::c_void,
    pub RevertSecurityContext: *mut core::ffi::c_void,
    pub MakeSignature: *mut core::ffi::c_void,
    pub VerifySignature: *mut core::ffi::c_void,
    pub FreeContextBuffer: *mut core::ffi::c_void,
    pub QuerySecurityPackageInfoA: *mut core::ffi::c_void,
    pub Reserved3: *mut core::ffi::c_void,
    pub Reserved4: *mut core::ffi::c_void,
    pub ExportSecurityContext: *mut core::ffi::c_void,
    pub ImportSecurityContextA: *mut core::ffi::c_void,
    pub AddCredentialsA: *mut core::ffi::c_void,
    pub Reserved8: *mut core::ffi::c_void,
    pub QuerySecurityContextToken: *mut core::ffi::c_void,
    pub EncryptMessage: *mut core::ffi::c_void,
    pub DecryptMessage: *mut core::ffi::c_void,
    pub SetContextAttributesA: *mut core::ffi::c_void,
    pub SetCredentialsAttributesA: *mut core::ffi::c_void,
    pub ChangeAccountPasswordA: *mut core::ffi::c_void,
    pub QueryContextAttributesExA: *mut core::ffi::c_void,
    pub QueryCredentialsAttributesExA: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type SecurityFunctionTableA struct {
	dwVersion uint32
	EnumerateSecurityPackagesA uintptr
	QueryCredentialsAttributesA uintptr
	AcquireCredentialsHandleA uintptr
	FreeCredentialsHandle uintptr
	Reserved2 uintptr
	InitializeSecurityContextA uintptr
	AcceptSecurityContext uintptr
	CompleteAuthToken uintptr
	DeleteSecurityContext uintptr
	ApplyControlToken uintptr
	QueryContextAttributesA uintptr
	ImpersonateSecurityContext uintptr
	RevertSecurityContext uintptr
	MakeSignature uintptr
	VerifySignature uintptr
	FreeContextBuffer uintptr
	QuerySecurityPackageInfoA uintptr
	Reserved3 uintptr
	Reserved4 uintptr
	ExportSecurityContext uintptr
	ImportSecurityContextA uintptr
	AddCredentialsA uintptr
	Reserved8 uintptr
	QuerySecurityContextToken uintptr
	EncryptMessage uintptr
	DecryptMessage uintptr
	SetContextAttributesA uintptr
	SetCredentialsAttributesA uintptr
	ChangeAccountPasswordA uintptr
	QueryContextAttributesExA uintptr
	QueryCredentialsAttributesExA uintptr
}
type
  SecurityFunctionTableA = record
    dwVersion: DWORD;
    EnumerateSecurityPackagesA: Pointer;
    QueryCredentialsAttributesA: Pointer;
    AcquireCredentialsHandleA: Pointer;
    FreeCredentialsHandle: Pointer;
    Reserved2: Pointer;
    InitializeSecurityContextA: Pointer;
    AcceptSecurityContext: Pointer;
    CompleteAuthToken: Pointer;
    DeleteSecurityContext: Pointer;
    ApplyControlToken: Pointer;
    QueryContextAttributesA: Pointer;
    ImpersonateSecurityContext: Pointer;
    RevertSecurityContext: Pointer;
    MakeSignature: Pointer;
    VerifySignature: Pointer;
    FreeContextBuffer: Pointer;
    QuerySecurityPackageInfoA: Pointer;
    Reserved3: Pointer;
    Reserved4: Pointer;
    ExportSecurityContext: Pointer;
    ImportSecurityContextA: Pointer;
    AddCredentialsA: Pointer;
    Reserved8: Pointer;
    QuerySecurityContextToken: Pointer;
    EncryptMessage: Pointer;
    DecryptMessage: Pointer;
    SetContextAttributesA: Pointer;
    SetCredentialsAttributesA: Pointer;
    ChangeAccountPasswordA: Pointer;
    QueryContextAttributesExA: Pointer;
    QueryCredentialsAttributesExA: Pointer;
  end;
const SecurityFunctionTableA = extern struct {
    dwVersion: u32,
    EnumerateSecurityPackagesA: ?*anyopaque,
    QueryCredentialsAttributesA: ?*anyopaque,
    AcquireCredentialsHandleA: ?*anyopaque,
    FreeCredentialsHandle: ?*anyopaque,
    Reserved2: ?*anyopaque,
    InitializeSecurityContextA: ?*anyopaque,
    AcceptSecurityContext: ?*anyopaque,
    CompleteAuthToken: ?*anyopaque,
    DeleteSecurityContext: ?*anyopaque,
    ApplyControlToken: ?*anyopaque,
    QueryContextAttributesA: ?*anyopaque,
    ImpersonateSecurityContext: ?*anyopaque,
    RevertSecurityContext: ?*anyopaque,
    MakeSignature: ?*anyopaque,
    VerifySignature: ?*anyopaque,
    FreeContextBuffer: ?*anyopaque,
    QuerySecurityPackageInfoA: ?*anyopaque,
    Reserved3: ?*anyopaque,
    Reserved4: ?*anyopaque,
    ExportSecurityContext: ?*anyopaque,
    ImportSecurityContextA: ?*anyopaque,
    AddCredentialsA: ?*anyopaque,
    Reserved8: ?*anyopaque,
    QuerySecurityContextToken: ?*anyopaque,
    EncryptMessage: ?*anyopaque,
    DecryptMessage: ?*anyopaque,
    SetContextAttributesA: ?*anyopaque,
    SetCredentialsAttributesA: ?*anyopaque,
    ChangeAccountPasswordA: ?*anyopaque,
    QueryContextAttributesExA: ?*anyopaque,
    QueryCredentialsAttributesExA: ?*anyopaque,
};
type
  SecurityFunctionTableA {.bycopy.} = object
    dwVersion: uint32
    EnumerateSecurityPackagesA: pointer
    QueryCredentialsAttributesA: pointer
    AcquireCredentialsHandleA: pointer
    FreeCredentialsHandle: pointer
    Reserved2: pointer
    InitializeSecurityContextA: pointer
    AcceptSecurityContext: pointer
    CompleteAuthToken: pointer
    DeleteSecurityContext: pointer
    ApplyControlToken: pointer
    QueryContextAttributesA: pointer
    ImpersonateSecurityContext: pointer
    RevertSecurityContext: pointer
    MakeSignature: pointer
    VerifySignature: pointer
    FreeContextBuffer: pointer
    QuerySecurityPackageInfoA: pointer
    Reserved3: pointer
    Reserved4: pointer
    ExportSecurityContext: pointer
    ImportSecurityContextA: pointer
    AddCredentialsA: pointer
    Reserved8: pointer
    QuerySecurityContextToken: pointer
    EncryptMessage: pointer
    DecryptMessage: pointer
    SetContextAttributesA: pointer
    SetCredentialsAttributesA: pointer
    ChangeAccountPasswordA: pointer
    QueryContextAttributesExA: pointer
    QueryCredentialsAttributesExA: pointer
struct SecurityFunctionTableA
{
    uint dwVersion;
    void* EnumerateSecurityPackagesA;
    void* QueryCredentialsAttributesA;
    void* AcquireCredentialsHandleA;
    void* FreeCredentialsHandle;
    void* Reserved2;
    void* InitializeSecurityContextA;
    void* AcceptSecurityContext;
    void* CompleteAuthToken;
    void* DeleteSecurityContext;
    void* ApplyControlToken;
    void* QueryContextAttributesA;
    void* ImpersonateSecurityContext;
    void* RevertSecurityContext;
    void* MakeSignature;
    void* VerifySignature;
    void* FreeContextBuffer;
    void* QuerySecurityPackageInfoA;
    void* Reserved3;
    void* Reserved4;
    void* ExportSecurityContext;
    void* ImportSecurityContextA;
    void* AddCredentialsA;
    void* Reserved8;
    void* QuerySecurityContextToken;
    void* EncryptMessage;
    void* DecryptMessage;
    void* SetContextAttributesA;
    void* SetCredentialsAttributesA;
    void* ChangeAccountPasswordA;
    void* QueryContextAttributesExA;
    void* QueryCredentialsAttributesExA;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SecurityFunctionTableA サイズ: 128 バイト(x86)
dim st, 32    ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; EnumerateSecurityPackagesA : ENUMERATE_SECURITY_PACKAGES_FN_A (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; QueryCredentialsAttributesA : QUERY_CREDENTIALS_ATTRIBUTES_FN_A (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; AcquireCredentialsHandleA : ACQUIRE_CREDENTIALS_HANDLE_FN_A (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; FreeCredentialsHandle : FREE_CREDENTIALS_HANDLE_FN (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; Reserved2 : void* (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; InitializeSecurityContextA : INITIALIZE_SECURITY_CONTEXT_FN_A (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; AcceptSecurityContext : ACCEPT_SECURITY_CONTEXT_FN (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; CompleteAuthToken : COMPLETE_AUTH_TOKEN_FN (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; DeleteSecurityContext : DELETE_SECURITY_CONTEXT_FN (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; ApplyControlToken : APPLY_CONTROL_TOKEN_FN (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; QueryContextAttributesA : QUERY_CONTEXT_ATTRIBUTES_FN_A (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; ImpersonateSecurityContext : IMPERSONATE_SECURITY_CONTEXT_FN (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; RevertSecurityContext : REVERT_SECURITY_CONTEXT_FN (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; MakeSignature : MAKE_SIGNATURE_FN (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; VerifySignature : VERIFY_SIGNATURE_FN (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; FreeContextBuffer : FREE_CONTEXT_BUFFER_FN (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; QuerySecurityPackageInfoA : QUERY_SECURITY_PACKAGE_INFO_FN_A (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; Reserved3 : void* (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; Reserved4 : void* (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; ExportSecurityContext : EXPORT_SECURITY_CONTEXT_FN (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; ImportSecurityContextA : IMPORT_SECURITY_CONTEXT_FN_A (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; AddCredentialsA : ADD_CREDENTIALS_FN_A (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; Reserved8 : void* (+92, 4byte)  st.23 = 値  /  値 = st.23   (lpoke/lpeek も可)
; QuerySecurityContextToken : QUERY_SECURITY_CONTEXT_TOKEN_FN (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; EncryptMessage : ENCRYPT_MESSAGE_FN (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; DecryptMessage : DECRYPT_MESSAGE_FN (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; SetContextAttributesA : SET_CONTEXT_ATTRIBUTES_FN_A (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; SetCredentialsAttributesA : SET_CREDENTIALS_ATTRIBUTES_FN_A (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; ChangeAccountPasswordA : CHANGE_PASSWORD_FN_A (+116, 4byte)  st.29 = 値  /  値 = st.29   (lpoke/lpeek も可)
; QueryContextAttributesExA : QUERY_CONTEXT_ATTRIBUTES_EX_FN_A (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; QueryCredentialsAttributesExA : QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A (+124, 4byte)  st.31 = 値  /  値 = st.31   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SecurityFunctionTableA サイズ: 256 バイト(x64)
dim st, 64    ; 4byte整数×64(構造体サイズ 256 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; EnumerateSecurityPackagesA : ENUMERATE_SECURITY_PACKAGES_FN_A (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; QueryCredentialsAttributesA : QUERY_CREDENTIALS_ATTRIBUTES_FN_A (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; AcquireCredentialsHandleA : ACQUIRE_CREDENTIALS_HANDLE_FN_A (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; FreeCredentialsHandle : FREE_CREDENTIALS_HANDLE_FN (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Reserved2 : void* (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; InitializeSecurityContextA : INITIALIZE_SECURITY_CONTEXT_FN_A (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; AcceptSecurityContext : ACCEPT_SECURITY_CONTEXT_FN (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; CompleteAuthToken : COMPLETE_AUTH_TOKEN_FN (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; DeleteSecurityContext : DELETE_SECURITY_CONTEXT_FN (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ApplyControlToken : APPLY_CONTROL_TOKEN_FN (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; QueryContextAttributesA : QUERY_CONTEXT_ATTRIBUTES_FN_A (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; ImpersonateSecurityContext : IMPERSONATE_SECURITY_CONTEXT_FN (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; RevertSecurityContext : REVERT_SECURITY_CONTEXT_FN (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; MakeSignature : MAKE_SIGNATURE_FN (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; VerifySignature : VERIFY_SIGNATURE_FN (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; FreeContextBuffer : FREE_CONTEXT_BUFFER_FN (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; QuerySecurityPackageInfoA : QUERY_SECURITY_PACKAGE_INFO_FN_A (+136, 8byte)  qpoke st,136,値 / qpeek(st,136)  ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; Reserved3 : void* (+144, 8byte)  qpoke st,144,値 / qpeek(st,144)  ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; Reserved4 : void* (+152, 8byte)  qpoke st,152,値 / qpeek(st,152)  ※IronHSPのみ。3.7/3.8は lpoke st,152,下位 : lpoke st,156,上位
; ExportSecurityContext : EXPORT_SECURITY_CONTEXT_FN (+160, 8byte)  qpoke st,160,値 / qpeek(st,160)  ※IronHSPのみ。3.7/3.8は lpoke st,160,下位 : lpoke st,164,上位
; ImportSecurityContextA : IMPORT_SECURITY_CONTEXT_FN_A (+168, 8byte)  qpoke st,168,値 / qpeek(st,168)  ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; AddCredentialsA : ADD_CREDENTIALS_FN_A (+176, 8byte)  qpoke st,176,値 / qpeek(st,176)  ※IronHSPのみ。3.7/3.8は lpoke st,176,下位 : lpoke st,180,上位
; Reserved8 : void* (+184, 8byte)  qpoke st,184,値 / qpeek(st,184)  ※IronHSPのみ。3.7/3.8は lpoke st,184,下位 : lpoke st,188,上位
; QuerySecurityContextToken : QUERY_SECURITY_CONTEXT_TOKEN_FN (+192, 8byte)  qpoke st,192,値 / qpeek(st,192)  ※IronHSPのみ。3.7/3.8は lpoke st,192,下位 : lpoke st,196,上位
; EncryptMessage : ENCRYPT_MESSAGE_FN (+200, 8byte)  qpoke st,200,値 / qpeek(st,200)  ※IronHSPのみ。3.7/3.8は lpoke st,200,下位 : lpoke st,204,上位
; DecryptMessage : DECRYPT_MESSAGE_FN (+208, 8byte)  qpoke st,208,値 / qpeek(st,208)  ※IronHSPのみ。3.7/3.8は lpoke st,208,下位 : lpoke st,212,上位
; SetContextAttributesA : SET_CONTEXT_ATTRIBUTES_FN_A (+216, 8byte)  qpoke st,216,値 / qpeek(st,216)  ※IronHSPのみ。3.7/3.8は lpoke st,216,下位 : lpoke st,220,上位
; SetCredentialsAttributesA : SET_CREDENTIALS_ATTRIBUTES_FN_A (+224, 8byte)  qpoke st,224,値 / qpeek(st,224)  ※IronHSPのみ。3.7/3.8は lpoke st,224,下位 : lpoke st,228,上位
; ChangeAccountPasswordA : CHANGE_PASSWORD_FN_A (+232, 8byte)  qpoke st,232,値 / qpeek(st,232)  ※IronHSPのみ。3.7/3.8は lpoke st,232,下位 : lpoke st,236,上位
; QueryContextAttributesExA : QUERY_CONTEXT_ATTRIBUTES_EX_FN_A (+240, 8byte)  qpoke st,240,値 / qpeek(st,240)  ※IronHSPのみ。3.7/3.8は lpoke st,240,下位 : lpoke st,244,上位
; QueryCredentialsAttributesExA : QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A (+248, 8byte)  qpoke st,248,値 / qpeek(st,248)  ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SecurityFunctionTableA
    #field int dwVersion
    #field intptr EnumerateSecurityPackagesA
    #field intptr QueryCredentialsAttributesA
    #field intptr AcquireCredentialsHandleA
    #field intptr FreeCredentialsHandle
    #field intptr Reserved2
    #field intptr InitializeSecurityContextA
    #field intptr AcceptSecurityContext
    #field intptr CompleteAuthToken
    #field intptr DeleteSecurityContext
    #field intptr ApplyControlToken
    #field intptr QueryContextAttributesA
    #field intptr ImpersonateSecurityContext
    #field intptr RevertSecurityContext
    #field intptr MakeSignature
    #field intptr VerifySignature
    #field intptr FreeContextBuffer
    #field intptr QuerySecurityPackageInfoA
    #field intptr Reserved3
    #field intptr Reserved4
    #field intptr ExportSecurityContext
    #field intptr ImportSecurityContextA
    #field intptr AddCredentialsA
    #field intptr Reserved8
    #field intptr QuerySecurityContextToken
    #field intptr EncryptMessage
    #field intptr DecryptMessage
    #field intptr SetContextAttributesA
    #field intptr SetCredentialsAttributesA
    #field intptr ChangeAccountPasswordA
    #field intptr QueryContextAttributesExA
    #field intptr QueryCredentialsAttributesExA
#endstruct

stdim st, SecurityFunctionTableA        ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion