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

SecurityFunctionTableW

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

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

フィールド

フィールドサイズx64x86説明
dwVersionDWORD4+0+0セキュリティ関数テーブルのバージョン番号。
EnumerateSecurityPackagesWENUMERATE_SECURITY_PACKAGES_FN_W8/4+8+4利用可能なセキュリティパッケージを列挙する関数へのポインタ(Unicode)。
QueryCredentialsAttributesWQUERY_CREDENTIALS_ATTRIBUTES_FN_W8/4+16+8資格情報の属性を問い合わせる関数へのポインタ(Unicode)。
AcquireCredentialsHandleWACQUIRE_CREDENTIALS_HANDLE_FN_W8/4+24+12資格情報ハンドルを取得する関数へのポインタ(Unicode)。
FreeCredentialsHandleFREE_CREDENTIALS_HANDLE_FN8/4+32+16資格情報ハンドルを解放する関数へのポインタ。
Reserved2void*8/4+40+20予約フィールド。使用しない。
InitializeSecurityContextWINITIALIZE_SECURITY_CONTEXT_FN_W8/4+48+24クライアント側のセキュリティコンテキストを初期化する関数へのポインタ(Unicode)。
AcceptSecurityContextACCEPT_SECURITY_CONTEXT_FN8/4+56+28サーバー側でセキュリティコンテキストを受理する関数へのポインタ。
CompleteAuthTokenCOMPLETE_AUTH_TOKEN_FN8/4+64+32認証トークンの最終処理を完了する関数へのポインタ。
DeleteSecurityContextDELETE_SECURITY_CONTEXT_FN8/4+72+36セキュリティコンテキストを削除する関数へのポインタ。
ApplyControlTokenAPPLY_CONTROL_TOKEN_FN8/4+80+40コンテキストへ制御トークンを適用する関数へのポインタ。
QueryContextAttributesWQUERY_CONTEXT_ATTRIBUTES_FN_W8/4+88+44セキュリティコンテキストの属性を問い合わせる関数へのポインタ(Unicode)。
ImpersonateSecurityContextIMPERSONATE_SECURITY_CONTEXT_FN8/4+96+48コンテキストのクライアントになりすます関数へのポインタ。
RevertSecurityContextREVERT_SECURITY_CONTEXT_FN8/4+104+52なりすましを解除する関数へのポインタ。
MakeSignatureMAKE_SIGNATURE_FN8/4+112+56メッセージへ署名を付与する関数へのポインタ。
VerifySignatureVERIFY_SIGNATURE_FN8/4+120+60メッセージ署名を検証する関数へのポインタ。
FreeContextBufferFREE_CONTEXT_BUFFER_FN8/4+128+64SSPIが割り当てたバッファを解放する関数へのポインタ。
QuerySecurityPackageInfoWQUERY_SECURITY_PACKAGE_INFO_FN_W8/4+136+68セキュリティパッケージ情報を問い合わせる関数へのポインタ(Unicode)。
Reserved3void*8/4+144+72予約フィールド。使用しない。
Reserved4void*8/4+152+76予約フィールド。使用しない。
ExportSecurityContextEXPORT_SECURITY_CONTEXT_FN8/4+160+80セキュリティコンテキストをエクスポートする関数へのポインタ。
ImportSecurityContextWIMPORT_SECURITY_CONTEXT_FN_W8/4+168+84セキュリティコンテキストをインポートする関数へのポインタ(Unicode)。
AddCredentialsWADD_CREDENTIALS_FN_W8/4+176+88既存の資格情報ハンドルへ資格情報を追加する関数へのポインタ(Unicode)。
Reserved8void*8/4+184+92予約フィールド。使用しない。
QuerySecurityContextTokenQUERY_SECURITY_CONTEXT_TOKEN_FN8/4+192+96コンテキストのアクセストークンを取得する関数へのポインタ。
EncryptMessageENCRYPT_MESSAGE_FN8/4+200+100メッセージを暗号化する関数へのポインタ。
DecryptMessageDECRYPT_MESSAGE_FN8/4+208+104メッセージを復号する関数へのポインタ。
SetContextAttributesWSET_CONTEXT_ATTRIBUTES_FN_W8/4+216+108セキュリティコンテキストの属性を設定する関数へのポインタ(Unicode)。
SetCredentialsAttributesWSET_CREDENTIALS_ATTRIBUTES_FN_W8/4+224+112資格情報の属性を設定する関数へのポインタ(Unicode)。
ChangeAccountPasswordWCHANGE_PASSWORD_FN_W8/4+232+116アカウントのパスワードを変更する関数へのポインタ(Unicode)。
QueryContextAttributesExWQUERY_CONTEXT_ATTRIBUTES_EX_FN_W8/4+240+120拡張版のコンテキスト属性問い合わせ関数へのポインタ(Unicode)。
QueryCredentialsAttributesExWQUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W8/4+248+124拡張版の資格情報属性問い合わせ関数へのポインタ(Unicode)。

各言語での定義

#include <windows.h>

// SecurityFunctionTableW  (x64 256 / x86 128 バイト)
typedef struct SecurityFunctionTableW {
    DWORD dwVersion;
    ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
    QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
    ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
    FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
    void* Reserved2;
    INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
    ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
    COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
    DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
    APPLY_CONTROL_TOKEN_FN ApplyControlToken;
    QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
    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_W QuerySecurityPackageInfoW;
    void* Reserved3;
    void* Reserved4;
    EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
    IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW;
    ADD_CREDENTIALS_FN_W AddCredentialsW;
    void* Reserved8;
    QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
    ENCRYPT_MESSAGE_FN EncryptMessage;
    DECRYPT_MESSAGE_FN DecryptMessage;
    SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW;
    SET_CREDENTIALS_ATTRIBUTES_FN_W SetCredentialsAttributesW;
    CHANGE_PASSWORD_FN_W ChangeAccountPasswordW;
    QUERY_CONTEXT_ATTRIBUTES_EX_FN_W QueryContextAttributesExW;
    QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W QueryCredentialsAttributesExW;
} SecurityFunctionTableW;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SecurityFunctionTableW
{
    public uint dwVersion;
    public IntPtr EnumerateSecurityPackagesW;
    public IntPtr QueryCredentialsAttributesW;
    public IntPtr AcquireCredentialsHandleW;
    public IntPtr FreeCredentialsHandle;
    public IntPtr Reserved2;
    public IntPtr InitializeSecurityContextW;
    public IntPtr AcceptSecurityContext;
    public IntPtr CompleteAuthToken;
    public IntPtr DeleteSecurityContext;
    public IntPtr ApplyControlToken;
    public IntPtr QueryContextAttributesW;
    public IntPtr ImpersonateSecurityContext;
    public IntPtr RevertSecurityContext;
    public IntPtr MakeSignature;
    public IntPtr VerifySignature;
    public IntPtr FreeContextBuffer;
    public IntPtr QuerySecurityPackageInfoW;
    public IntPtr Reserved3;
    public IntPtr Reserved4;
    public IntPtr ExportSecurityContext;
    public IntPtr ImportSecurityContextW;
    public IntPtr AddCredentialsW;
    public IntPtr Reserved8;
    public IntPtr QuerySecurityContextToken;
    public IntPtr EncryptMessage;
    public IntPtr DecryptMessage;
    public IntPtr SetContextAttributesW;
    public IntPtr SetCredentialsAttributesW;
    public IntPtr ChangeAccountPasswordW;
    public IntPtr QueryContextAttributesExW;
    public IntPtr QueryCredentialsAttributesExW;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SecurityFunctionTableW
    Public dwVersion As UInteger
    Public EnumerateSecurityPackagesW As IntPtr
    Public QueryCredentialsAttributesW As IntPtr
    Public AcquireCredentialsHandleW As IntPtr
    Public FreeCredentialsHandle As IntPtr
    Public Reserved2 As IntPtr
    Public InitializeSecurityContextW As IntPtr
    Public AcceptSecurityContext As IntPtr
    Public CompleteAuthToken As IntPtr
    Public DeleteSecurityContext As IntPtr
    Public ApplyControlToken As IntPtr
    Public QueryContextAttributesW As IntPtr
    Public ImpersonateSecurityContext As IntPtr
    Public RevertSecurityContext As IntPtr
    Public MakeSignature As IntPtr
    Public VerifySignature As IntPtr
    Public FreeContextBuffer As IntPtr
    Public QuerySecurityPackageInfoW As IntPtr
    Public Reserved3 As IntPtr
    Public Reserved4 As IntPtr
    Public ExportSecurityContext As IntPtr
    Public ImportSecurityContextW As IntPtr
    Public AddCredentialsW As IntPtr
    Public Reserved8 As IntPtr
    Public QuerySecurityContextToken As IntPtr
    Public EncryptMessage As IntPtr
    Public DecryptMessage As IntPtr
    Public SetContextAttributesW As IntPtr
    Public SetCredentialsAttributesW As IntPtr
    Public ChangeAccountPasswordW As IntPtr
    Public QueryContextAttributesExW As IntPtr
    Public QueryCredentialsAttributesExW As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class SecurityFunctionTableW(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("EnumerateSecurityPackagesW", ctypes.c_void_p),
        ("QueryCredentialsAttributesW", ctypes.c_void_p),
        ("AcquireCredentialsHandleW", ctypes.c_void_p),
        ("FreeCredentialsHandle", ctypes.c_void_p),
        ("Reserved2", ctypes.c_void_p),
        ("InitializeSecurityContextW", ctypes.c_void_p),
        ("AcceptSecurityContext", ctypes.c_void_p),
        ("CompleteAuthToken", ctypes.c_void_p),
        ("DeleteSecurityContext", ctypes.c_void_p),
        ("ApplyControlToken", ctypes.c_void_p),
        ("QueryContextAttributesW", 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),
        ("QuerySecurityPackageInfoW", ctypes.c_void_p),
        ("Reserved3", ctypes.c_void_p),
        ("Reserved4", ctypes.c_void_p),
        ("ExportSecurityContext", ctypes.c_void_p),
        ("ImportSecurityContextW", ctypes.c_void_p),
        ("AddCredentialsW", ctypes.c_void_p),
        ("Reserved8", ctypes.c_void_p),
        ("QuerySecurityContextToken", ctypes.c_void_p),
        ("EncryptMessage", ctypes.c_void_p),
        ("DecryptMessage", ctypes.c_void_p),
        ("SetContextAttributesW", ctypes.c_void_p),
        ("SetCredentialsAttributesW", ctypes.c_void_p),
        ("ChangeAccountPasswordW", ctypes.c_void_p),
        ("QueryContextAttributesExW", ctypes.c_void_p),
        ("QueryCredentialsAttributesExW", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct SecurityFunctionTableW {
    pub dwVersion: u32,
    pub EnumerateSecurityPackagesW: *mut core::ffi::c_void,
    pub QueryCredentialsAttributesW: *mut core::ffi::c_void,
    pub AcquireCredentialsHandleW: *mut core::ffi::c_void,
    pub FreeCredentialsHandle: *mut core::ffi::c_void,
    pub Reserved2: *mut core::ffi::c_void,
    pub InitializeSecurityContextW: *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 QueryContextAttributesW: *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 QuerySecurityPackageInfoW: *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 ImportSecurityContextW: *mut core::ffi::c_void,
    pub AddCredentialsW: *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 SetContextAttributesW: *mut core::ffi::c_void,
    pub SetCredentialsAttributesW: *mut core::ffi::c_void,
    pub ChangeAccountPasswordW: *mut core::ffi::c_void,
    pub QueryContextAttributesExW: *mut core::ffi::c_void,
    pub QueryCredentialsAttributesExW: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type SecurityFunctionTableW struct {
	dwVersion uint32
	EnumerateSecurityPackagesW uintptr
	QueryCredentialsAttributesW uintptr
	AcquireCredentialsHandleW uintptr
	FreeCredentialsHandle uintptr
	Reserved2 uintptr
	InitializeSecurityContextW uintptr
	AcceptSecurityContext uintptr
	CompleteAuthToken uintptr
	DeleteSecurityContext uintptr
	ApplyControlToken uintptr
	QueryContextAttributesW uintptr
	ImpersonateSecurityContext uintptr
	RevertSecurityContext uintptr
	MakeSignature uintptr
	VerifySignature uintptr
	FreeContextBuffer uintptr
	QuerySecurityPackageInfoW uintptr
	Reserved3 uintptr
	Reserved4 uintptr
	ExportSecurityContext uintptr
	ImportSecurityContextW uintptr
	AddCredentialsW uintptr
	Reserved8 uintptr
	QuerySecurityContextToken uintptr
	EncryptMessage uintptr
	DecryptMessage uintptr
	SetContextAttributesW uintptr
	SetCredentialsAttributesW uintptr
	ChangeAccountPasswordW uintptr
	QueryContextAttributesExW uintptr
	QueryCredentialsAttributesExW uintptr
}
type
  SecurityFunctionTableW = record
    dwVersion: DWORD;
    EnumerateSecurityPackagesW: Pointer;
    QueryCredentialsAttributesW: Pointer;
    AcquireCredentialsHandleW: Pointer;
    FreeCredentialsHandle: Pointer;
    Reserved2: Pointer;
    InitializeSecurityContextW: Pointer;
    AcceptSecurityContext: Pointer;
    CompleteAuthToken: Pointer;
    DeleteSecurityContext: Pointer;
    ApplyControlToken: Pointer;
    QueryContextAttributesW: Pointer;
    ImpersonateSecurityContext: Pointer;
    RevertSecurityContext: Pointer;
    MakeSignature: Pointer;
    VerifySignature: Pointer;
    FreeContextBuffer: Pointer;
    QuerySecurityPackageInfoW: Pointer;
    Reserved3: Pointer;
    Reserved4: Pointer;
    ExportSecurityContext: Pointer;
    ImportSecurityContextW: Pointer;
    AddCredentialsW: Pointer;
    Reserved8: Pointer;
    QuerySecurityContextToken: Pointer;
    EncryptMessage: Pointer;
    DecryptMessage: Pointer;
    SetContextAttributesW: Pointer;
    SetCredentialsAttributesW: Pointer;
    ChangeAccountPasswordW: Pointer;
    QueryContextAttributesExW: Pointer;
    QueryCredentialsAttributesExW: Pointer;
  end;
const SecurityFunctionTableW = extern struct {
    dwVersion: u32,
    EnumerateSecurityPackagesW: ?*anyopaque,
    QueryCredentialsAttributesW: ?*anyopaque,
    AcquireCredentialsHandleW: ?*anyopaque,
    FreeCredentialsHandle: ?*anyopaque,
    Reserved2: ?*anyopaque,
    InitializeSecurityContextW: ?*anyopaque,
    AcceptSecurityContext: ?*anyopaque,
    CompleteAuthToken: ?*anyopaque,
    DeleteSecurityContext: ?*anyopaque,
    ApplyControlToken: ?*anyopaque,
    QueryContextAttributesW: ?*anyopaque,
    ImpersonateSecurityContext: ?*anyopaque,
    RevertSecurityContext: ?*anyopaque,
    MakeSignature: ?*anyopaque,
    VerifySignature: ?*anyopaque,
    FreeContextBuffer: ?*anyopaque,
    QuerySecurityPackageInfoW: ?*anyopaque,
    Reserved3: ?*anyopaque,
    Reserved4: ?*anyopaque,
    ExportSecurityContext: ?*anyopaque,
    ImportSecurityContextW: ?*anyopaque,
    AddCredentialsW: ?*anyopaque,
    Reserved8: ?*anyopaque,
    QuerySecurityContextToken: ?*anyopaque,
    EncryptMessage: ?*anyopaque,
    DecryptMessage: ?*anyopaque,
    SetContextAttributesW: ?*anyopaque,
    SetCredentialsAttributesW: ?*anyopaque,
    ChangeAccountPasswordW: ?*anyopaque,
    QueryContextAttributesExW: ?*anyopaque,
    QueryCredentialsAttributesExW: ?*anyopaque,
};
type
  SecurityFunctionTableW {.bycopy.} = object
    dwVersion: uint32
    EnumerateSecurityPackagesW: pointer
    QueryCredentialsAttributesW: pointer
    AcquireCredentialsHandleW: pointer
    FreeCredentialsHandle: pointer
    Reserved2: pointer
    InitializeSecurityContextW: pointer
    AcceptSecurityContext: pointer
    CompleteAuthToken: pointer
    DeleteSecurityContext: pointer
    ApplyControlToken: pointer
    QueryContextAttributesW: pointer
    ImpersonateSecurityContext: pointer
    RevertSecurityContext: pointer
    MakeSignature: pointer
    VerifySignature: pointer
    FreeContextBuffer: pointer
    QuerySecurityPackageInfoW: pointer
    Reserved3: pointer
    Reserved4: pointer
    ExportSecurityContext: pointer
    ImportSecurityContextW: pointer
    AddCredentialsW: pointer
    Reserved8: pointer
    QuerySecurityContextToken: pointer
    EncryptMessage: pointer
    DecryptMessage: pointer
    SetContextAttributesW: pointer
    SetCredentialsAttributesW: pointer
    ChangeAccountPasswordW: pointer
    QueryContextAttributesExW: pointer
    QueryCredentialsAttributesExW: pointer
struct SecurityFunctionTableW
{
    uint dwVersion;
    void* EnumerateSecurityPackagesW;
    void* QueryCredentialsAttributesW;
    void* AcquireCredentialsHandleW;
    void* FreeCredentialsHandle;
    void* Reserved2;
    void* InitializeSecurityContextW;
    void* AcceptSecurityContext;
    void* CompleteAuthToken;
    void* DeleteSecurityContext;
    void* ApplyControlToken;
    void* QueryContextAttributesW;
    void* ImpersonateSecurityContext;
    void* RevertSecurityContext;
    void* MakeSignature;
    void* VerifySignature;
    void* FreeContextBuffer;
    void* QuerySecurityPackageInfoW;
    void* Reserved3;
    void* Reserved4;
    void* ExportSecurityContext;
    void* ImportSecurityContextW;
    void* AddCredentialsW;
    void* Reserved8;
    void* QuerySecurityContextToken;
    void* EncryptMessage;
    void* DecryptMessage;
    void* SetContextAttributesW;
    void* SetCredentialsAttributesW;
    void* ChangeAccountPasswordW;
    void* QueryContextAttributesExW;
    void* QueryCredentialsAttributesExW;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SecurityFunctionTableW サイズ: 128 バイト(x86)
dim st, 32    ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; EnumerateSecurityPackagesW : ENUMERATE_SECURITY_PACKAGES_FN_W (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; QueryCredentialsAttributesW : QUERY_CREDENTIALS_ATTRIBUTES_FN_W (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; AcquireCredentialsHandleW : ACQUIRE_CREDENTIALS_HANDLE_FN_W (+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 も可)
; InitializeSecurityContextW : INITIALIZE_SECURITY_CONTEXT_FN_W (+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 も可)
; QueryContextAttributesW : QUERY_CONTEXT_ATTRIBUTES_FN_W (+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 も可)
; QuerySecurityPackageInfoW : QUERY_SECURITY_PACKAGE_INFO_FN_W (+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 も可)
; ImportSecurityContextW : IMPORT_SECURITY_CONTEXT_FN_W (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; AddCredentialsW : ADD_CREDENTIALS_FN_W (+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 も可)
; SetContextAttributesW : SET_CONTEXT_ATTRIBUTES_FN_W (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; SetCredentialsAttributesW : SET_CREDENTIALS_ATTRIBUTES_FN_W (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; ChangeAccountPasswordW : CHANGE_PASSWORD_FN_W (+116, 4byte)  st.29 = 値  /  値 = st.29   (lpoke/lpeek も可)
; QueryContextAttributesExW : QUERY_CONTEXT_ATTRIBUTES_EX_FN_W (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; QueryCredentialsAttributesExW : QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W (+124, 4byte)  st.31 = 値  /  値 = st.31   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SecurityFunctionTableW サイズ: 256 バイト(x64)
dim st, 64    ; 4byte整数×64(構造体サイズ 256 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; EnumerateSecurityPackagesW : ENUMERATE_SECURITY_PACKAGES_FN_W (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; QueryCredentialsAttributesW : QUERY_CREDENTIALS_ATTRIBUTES_FN_W (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; AcquireCredentialsHandleW : ACQUIRE_CREDENTIALS_HANDLE_FN_W (+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,上位
; InitializeSecurityContextW : INITIALIZE_SECURITY_CONTEXT_FN_W (+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,上位
; QueryContextAttributesW : QUERY_CONTEXT_ATTRIBUTES_FN_W (+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,上位
; QuerySecurityPackageInfoW : QUERY_SECURITY_PACKAGE_INFO_FN_W (+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,上位
; ImportSecurityContextW : IMPORT_SECURITY_CONTEXT_FN_W (+168, 8byte)  qpoke st,168,値 / qpeek(st,168)  ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; AddCredentialsW : ADD_CREDENTIALS_FN_W (+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,上位
; SetContextAttributesW : SET_CONTEXT_ATTRIBUTES_FN_W (+216, 8byte)  qpoke st,216,値 / qpeek(st,216)  ※IronHSPのみ。3.7/3.8は lpoke st,216,下位 : lpoke st,220,上位
; SetCredentialsAttributesW : SET_CREDENTIALS_ATTRIBUTES_FN_W (+224, 8byte)  qpoke st,224,値 / qpeek(st,224)  ※IronHSPのみ。3.7/3.8は lpoke st,224,下位 : lpoke st,228,上位
; ChangeAccountPasswordW : CHANGE_PASSWORD_FN_W (+232, 8byte)  qpoke st,232,値 / qpeek(st,232)  ※IronHSPのみ。3.7/3.8は lpoke st,232,下位 : lpoke st,236,上位
; QueryContextAttributesExW : QUERY_CONTEXT_ATTRIBUTES_EX_FN_W (+240, 8byte)  qpoke st,240,値 / qpeek(st,240)  ※IronHSPのみ。3.7/3.8は lpoke st,240,下位 : lpoke st,244,上位
; QueryCredentialsAttributesExW : QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W (+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 SecurityFunctionTableW
    #field int dwVersion
    #field intptr EnumerateSecurityPackagesW
    #field intptr QueryCredentialsAttributesW
    #field intptr AcquireCredentialsHandleW
    #field intptr FreeCredentialsHandle
    #field intptr Reserved2
    #field intptr InitializeSecurityContextW
    #field intptr AcceptSecurityContext
    #field intptr CompleteAuthToken
    #field intptr DeleteSecurityContext
    #field intptr ApplyControlToken
    #field intptr QueryContextAttributesW
    #field intptr ImpersonateSecurityContext
    #field intptr RevertSecurityContext
    #field intptr MakeSignature
    #field intptr VerifySignature
    #field intptr FreeContextBuffer
    #field intptr QuerySecurityPackageInfoW
    #field intptr Reserved3
    #field intptr Reserved4
    #field intptr ExportSecurityContext
    #field intptr ImportSecurityContextW
    #field intptr AddCredentialsW
    #field intptr Reserved8
    #field intptr QuerySecurityContextToken
    #field intptr EncryptMessage
    #field intptr DecryptMessage
    #field intptr SetContextAttributesW
    #field intptr SetCredentialsAttributesW
    #field intptr ChangeAccountPasswordW
    #field intptr QueryContextAttributesExW
    #field intptr QueryCredentialsAttributesExW
#endstruct

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