ホーム › Security.Authentication.Identity › SspiDecryptAuthIdentityEx
SspiDecryptAuthIdentityEx
関数オプション指定で暗号化済み認証情報構造体を復号する拡張版である。
シグネチャ
// SspiCli.dll
#include <windows.h>
HRESULT SspiDecryptAuthIdentityEx(
DWORD Options,
void* EncryptedAuthData
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Options | DWORD | in |
| EncryptedAuthData | void* | inout |
戻り値の型: HRESULT
各言語での呼び出し定義
// SspiCli.dll
#include <windows.h>
HRESULT SspiDecryptAuthIdentityEx(
DWORD Options,
void* EncryptedAuthData
);[DllImport("SspiCli.dll", ExactSpelling = true)]
static extern int SspiDecryptAuthIdentityEx(
uint Options, // DWORD
IntPtr EncryptedAuthData // void* in/out
);<DllImport("SspiCli.dll", ExactSpelling:=True)>
Public Shared Function SspiDecryptAuthIdentityEx(
Options As UInteger, ' DWORD
EncryptedAuthData As IntPtr ' void* in/out
) As Integer
End Function' Options : DWORD
' EncryptedAuthData : void* in/out
Declare PtrSafe Function SspiDecryptAuthIdentityEx Lib "sspicli" ( _
ByVal Options As Long, _
ByVal EncryptedAuthData As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SspiDecryptAuthIdentityEx = ctypes.windll.sspicli.SspiDecryptAuthIdentityEx
SspiDecryptAuthIdentityEx.restype = ctypes.c_int
SspiDecryptAuthIdentityEx.argtypes = [
wintypes.DWORD, # Options : DWORD
ctypes.POINTER(None), # EncryptedAuthData : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SspiCli.dll')
SspiDecryptAuthIdentityEx = Fiddle::Function.new(
lib['SspiDecryptAuthIdentityEx'],
[
-Fiddle::TYPE_INT, # Options : DWORD
Fiddle::TYPE_VOIDP, # EncryptedAuthData : void* in/out
],
Fiddle::TYPE_INT)#[link(name = "sspicli")]
extern "system" {
fn SspiDecryptAuthIdentityEx(
Options: u32, // DWORD
EncryptedAuthData: *mut () // void* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("SspiCli.dll")]
public static extern int SspiDecryptAuthIdentityEx(uint Options, IntPtr EncryptedAuthData);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SspiCli_SspiDecryptAuthIdentityEx' -Namespace Win32 -PassThru
# $api::SspiDecryptAuthIdentityEx(Options, EncryptedAuthData)#uselib "SspiCli.dll"
#func global SspiDecryptAuthIdentityEx "SspiDecryptAuthIdentityEx" sptr, sptr
; SspiDecryptAuthIdentityEx Options, EncryptedAuthData ; 戻り値は stat
; Options : DWORD -> "sptr"
; EncryptedAuthData : void* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "SspiCli.dll"
#cfunc global SspiDecryptAuthIdentityEx "SspiDecryptAuthIdentityEx" int, sptr
; res = SspiDecryptAuthIdentityEx(Options, EncryptedAuthData)
; Options : DWORD -> "int"
; EncryptedAuthData : void* in/out -> "sptr"; HRESULT SspiDecryptAuthIdentityEx(DWORD Options, void* EncryptedAuthData)
#uselib "SspiCli.dll"
#cfunc global SspiDecryptAuthIdentityEx "SspiDecryptAuthIdentityEx" int, intptr
; res = SspiDecryptAuthIdentityEx(Options, EncryptedAuthData)
; Options : DWORD -> "int"
; EncryptedAuthData : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
sspicli = windows.NewLazySystemDLL("SspiCli.dll")
procSspiDecryptAuthIdentityEx = sspicli.NewProc("SspiDecryptAuthIdentityEx")
)
// Options (DWORD), EncryptedAuthData (void* in/out)
r1, _, err := procSspiDecryptAuthIdentityEx.Call(
uintptr(Options),
uintptr(EncryptedAuthData),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction SspiDecryptAuthIdentityEx(
Options: DWORD; // DWORD
EncryptedAuthData: Pointer // void* in/out
): Integer; stdcall;
external 'SspiCli.dll' name 'SspiDecryptAuthIdentityEx';result := DllCall("SspiCli\SspiDecryptAuthIdentityEx"
, "UInt", Options ; DWORD
, "Ptr", EncryptedAuthData ; void* in/out
, "Int") ; return: HRESULT●SspiDecryptAuthIdentityEx(Options, EncryptedAuthData) = DLL("SspiCli.dll", "int SspiDecryptAuthIdentityEx(dword, void*)")
# 呼び出し: SspiDecryptAuthIdentityEx(Options, EncryptedAuthData)
# Options : DWORD -> "dword"
# EncryptedAuthData : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。