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