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