Win32 API 日本語リファレンス
ホームDevices.AllJoyn › alljoyn_credentials_getexpiration

alljoyn_credentials_getexpiration

関数
資格情報の有効期限を取得する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

// MSAJApi.dll
#include <windows.h>

DWORD alljoyn_credentials_getexpiration(
    alljoyn_credentials cred
);

パラメーター

名前方向
credalljoyn_credentialsin

戻り値の型: DWORD

各言語での呼び出し定義

// MSAJApi.dll
#include <windows.h>

DWORD alljoyn_credentials_getexpiration(
    alljoyn_credentials cred
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern uint alljoyn_credentials_getexpiration(
    IntPtr cred   // alljoyn_credentials
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_credentials_getexpiration(
    cred As IntPtr   ' alljoyn_credentials
) As UInteger
End Function
' cred : alljoyn_credentials
Declare PtrSafe Function alljoyn_credentials_getexpiration Lib "msajapi" ( _
    ByVal cred As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_credentials_getexpiration = ctypes.windll.msajapi.alljoyn_credentials_getexpiration
alljoyn_credentials_getexpiration.restype = wintypes.DWORD
alljoyn_credentials_getexpiration.argtypes = [
    ctypes.c_ssize_t,  # cred : alljoyn_credentials
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_credentials_getexpiration = Fiddle::Function.new(
  lib['alljoyn_credentials_getexpiration'],
  [
    Fiddle::TYPE_INTPTR_T,  # cred : alljoyn_credentials
  ],
  -Fiddle::TYPE_INT)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_credentials_getexpiration(
        cred: isize  // alljoyn_credentials
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern uint alljoyn_credentials_getexpiration(IntPtr cred);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_credentials_getexpiration' -Namespace Win32 -PassThru
# $api::alljoyn_credentials_getexpiration(cred)
#uselib "MSAJApi.dll"
#func global alljoyn_credentials_getexpiration "alljoyn_credentials_getexpiration" sptr
; alljoyn_credentials_getexpiration cred   ; 戻り値は stat
; cred : alljoyn_credentials -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSAJApi.dll"
#cfunc global alljoyn_credentials_getexpiration "alljoyn_credentials_getexpiration" sptr
; res = alljoyn_credentials_getexpiration(cred)
; cred : alljoyn_credentials -> "sptr"
; DWORD alljoyn_credentials_getexpiration(alljoyn_credentials cred)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_credentials_getexpiration "alljoyn_credentials_getexpiration" intptr
; res = alljoyn_credentials_getexpiration(cred)
; cred : alljoyn_credentials -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_credentials_getexpiration = msajapi.NewProc("alljoyn_credentials_getexpiration")
)

// cred (alljoyn_credentials)
r1, _, err := procalljoyn_credentials_getexpiration.Call(
	uintptr(cred),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function alljoyn_credentials_getexpiration(
  cred: NativeInt   // alljoyn_credentials
): DWORD; stdcall;
  external 'MSAJApi.dll' name 'alljoyn_credentials_getexpiration';
result := DllCall("MSAJApi\alljoyn_credentials_getexpiration"
    , "Ptr", cred   ; alljoyn_credentials
    , "UInt")   ; return: DWORD
●alljoyn_credentials_getexpiration(cred) = DLL("MSAJApi.dll", "dword alljoyn_credentials_getexpiration(int)")
# 呼び出し: alljoyn_credentials_getexpiration(cred)
# cred : alljoyn_credentials -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。