ホーム › Devices.AllJoyn › alljoyn_credentials_setcertchain
alljoyn_credentials_setcertchain
関数資格情報に証明書チェーンを設定する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
void alljoyn_credentials_setcertchain(
alljoyn_credentials cred,
LPCSTR certChain
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| cred | alljoyn_credentials | in | 設定対象の資格情報ハンドル。 |
| certChain | LPCSTR | in | 設定する証明書チェーンをPEM形式で表すNULL終端文字列。 |
戻り値の型: void
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
void alljoyn_credentials_setcertchain(
alljoyn_credentials cred,
LPCSTR certChain
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern void alljoyn_credentials_setcertchain(
IntPtr cred, // alljoyn_credentials
[MarshalAs(UnmanagedType.LPStr)] string certChain // LPCSTR
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Sub alljoyn_credentials_setcertchain(
cred As IntPtr, ' alljoyn_credentials
<MarshalAs(UnmanagedType.LPStr)> certChain As String ' LPCSTR
)
End Sub' cred : alljoyn_credentials
' certChain : LPCSTR
Declare PtrSafe Sub alljoyn_credentials_setcertchain Lib "msajapi" ( _
ByVal cred As LongPtr, _
ByVal certChain As String)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_credentials_setcertchain = ctypes.windll.msajapi.alljoyn_credentials_setcertchain
alljoyn_credentials_setcertchain.restype = None
alljoyn_credentials_setcertchain.argtypes = [
ctypes.c_ssize_t, # cred : alljoyn_credentials
wintypes.LPCSTR, # certChain : LPCSTR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_credentials_setcertchain = Fiddle::Function.new(
lib['alljoyn_credentials_setcertchain'],
[
Fiddle::TYPE_INTPTR_T, # cred : alljoyn_credentials
Fiddle::TYPE_VOIDP, # certChain : LPCSTR
],
Fiddle::TYPE_VOID)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_credentials_setcertchain(
cred: isize, // alljoyn_credentials
certChain: *const u8 // LPCSTR
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern void alljoyn_credentials_setcertchain(IntPtr cred, [MarshalAs(UnmanagedType.LPStr)] string certChain);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_credentials_setcertchain' -Namespace Win32 -PassThru
# $api::alljoyn_credentials_setcertchain(cred, certChain)#uselib "MSAJApi.dll"
#func global alljoyn_credentials_setcertchain "alljoyn_credentials_setcertchain" sptr, sptr
; alljoyn_credentials_setcertchain cred, certChain
; cred : alljoyn_credentials -> "sptr"
; certChain : LPCSTR -> "sptr"#uselib "MSAJApi.dll"
#func global alljoyn_credentials_setcertchain "alljoyn_credentials_setcertchain" sptr, str
; alljoyn_credentials_setcertchain cred, certChain
; cred : alljoyn_credentials -> "sptr"
; certChain : LPCSTR -> "str"; void alljoyn_credentials_setcertchain(alljoyn_credentials cred, LPCSTR certChain)
#uselib "MSAJApi.dll"
#func global alljoyn_credentials_setcertchain "alljoyn_credentials_setcertchain" intptr, str
; alljoyn_credentials_setcertchain cred, certChain
; cred : alljoyn_credentials -> "intptr"
; certChain : LPCSTR -> "str"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_credentials_setcertchain = msajapi.NewProc("alljoyn_credentials_setcertchain")
)
// cred (alljoyn_credentials), certChain (LPCSTR)
r1, _, err := procalljoyn_credentials_setcertchain.Call(
uintptr(cred),
uintptr(unsafe.Pointer(windows.BytePtrFromString(certChain))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure alljoyn_credentials_setcertchain(
cred: NativeInt; // alljoyn_credentials
certChain: PAnsiChar // LPCSTR
); stdcall;
external 'MSAJApi.dll' name 'alljoyn_credentials_setcertchain';result := DllCall("MSAJApi\alljoyn_credentials_setcertchain"
, "Ptr", cred ; alljoyn_credentials
, "AStr", certChain ; LPCSTR
, "Int") ; return: void●alljoyn_credentials_setcertchain(cred, certChain) = DLL("MSAJApi.dll", "int alljoyn_credentials_setcertchain(int, char*)")
# 呼び出し: alljoyn_credentials_setcertchain(cred, certChain)
# cred : alljoyn_credentials -> "int"
# certChain : LPCSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。