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

SspiIsAuthIdentityEncrypted

関数
認証情報構造体が暗号化されているかどうかを判定する。
DLLSECUR32.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

// SECUR32.dll
#include <windows.h>

BOOLEAN SspiIsAuthIdentityEncrypted(
    void* EncryptedAuthData
);

パラメーター

名前方向
EncryptedAuthDatavoid*in

戻り値の型: BOOLEAN

各言語での呼び出し定義

// SECUR32.dll
#include <windows.h>

BOOLEAN SspiIsAuthIdentityEncrypted(
    void* EncryptedAuthData
);
[DllImport("SECUR32.dll", ExactSpelling = true)]
static extern byte SspiIsAuthIdentityEncrypted(
    IntPtr EncryptedAuthData   // void*
);
<DllImport("SECUR32.dll", ExactSpelling:=True)>
Public Shared Function SspiIsAuthIdentityEncrypted(
    EncryptedAuthData As IntPtr   ' void*
) As Byte
End Function
' EncryptedAuthData : void*
Declare PtrSafe Function SspiIsAuthIdentityEncrypted Lib "secur32" ( _
    ByVal EncryptedAuthData As LongPtr) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

SspiIsAuthIdentityEncrypted = ctypes.windll.secur32.SspiIsAuthIdentityEncrypted
SspiIsAuthIdentityEncrypted.restype = ctypes.c_byte
SspiIsAuthIdentityEncrypted.argtypes = [
    ctypes.POINTER(None),  # EncryptedAuthData : void*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('SECUR32.dll')
SspiIsAuthIdentityEncrypted = Fiddle::Function.new(
  lib['SspiIsAuthIdentityEncrypted'],
  [
    Fiddle::TYPE_VOIDP,  # EncryptedAuthData : void*
  ],
  Fiddle::TYPE_CHAR)
#[link(name = "secur32")]
extern "system" {
    fn SspiIsAuthIdentityEncrypted(
        EncryptedAuthData: *mut ()  // void*
    ) -> u8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("SECUR32.dll")]
public static extern byte SspiIsAuthIdentityEncrypted(IntPtr EncryptedAuthData);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SECUR32_SspiIsAuthIdentityEncrypted' -Namespace Win32 -PassThru
# $api::SspiIsAuthIdentityEncrypted(EncryptedAuthData)
#uselib "SECUR32.dll"
#func global SspiIsAuthIdentityEncrypted "SspiIsAuthIdentityEncrypted" sptr
; SspiIsAuthIdentityEncrypted EncryptedAuthData   ; 戻り値は stat
; EncryptedAuthData : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "SECUR32.dll"
#cfunc global SspiIsAuthIdentityEncrypted "SspiIsAuthIdentityEncrypted" sptr
; res = SspiIsAuthIdentityEncrypted(EncryptedAuthData)
; EncryptedAuthData : void* -> "sptr"
; BOOLEAN SspiIsAuthIdentityEncrypted(void* EncryptedAuthData)
#uselib "SECUR32.dll"
#cfunc global SspiIsAuthIdentityEncrypted "SspiIsAuthIdentityEncrypted" intptr
; res = SspiIsAuthIdentityEncrypted(EncryptedAuthData)
; EncryptedAuthData : void* -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	secur32 = windows.NewLazySystemDLL("SECUR32.dll")
	procSspiIsAuthIdentityEncrypted = secur32.NewProc("SspiIsAuthIdentityEncrypted")
)

// EncryptedAuthData (void*)
r1, _, err := procSspiIsAuthIdentityEncrypted.Call(
	uintptr(EncryptedAuthData),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOLEAN
function SspiIsAuthIdentityEncrypted(
  EncryptedAuthData: Pointer   // void*
): ByteBool; stdcall;
  external 'SECUR32.dll' name 'SspiIsAuthIdentityEncrypted';
result := DllCall("SECUR32\SspiIsAuthIdentityEncrypted"
    , "Ptr", EncryptedAuthData   ; void*
    , "Char")   ; return: BOOLEAN
●SspiIsAuthIdentityEncrypted(EncryptedAuthData) = DLL("SECUR32.dll", "byte SspiIsAuthIdentityEncrypted(void*)")
# 呼び出し: SspiIsAuthIdentityEncrypted(EncryptedAuthData)
# EncryptedAuthData : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。