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