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

alljoyn_authlistener_requestcredentialsresponse

関数
資格情報要求コールバックに対し非同期で資格情報を応答する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

QStatus alljoyn_authlistener_requestcredentialsresponse(
    alljoyn_authlistener listener,
    void* authContext,
    INT accept,
    alljoyn_credentials credentials
);

パラメーター

名前方向説明
listeneralljoyn_authlistenerin応答を返す対象の認証リスナーハンドル。
authContextvoid*inout対応する認証要求を識別するコンテキストポインタ。
acceptINTin資格情報要求を受諾するか否か。非0で受諾、0で拒否。
credentialsalljoyn_credentialsin提供する資格情報を保持するハンドル。

戻り値の型: QStatus

各言語での呼び出し定義

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

QStatus alljoyn_authlistener_requestcredentialsresponse(
    alljoyn_authlistener listener,
    void* authContext,
    INT accept,
    alljoyn_credentials credentials
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_authlistener_requestcredentialsresponse(
    IntPtr listener,   // alljoyn_authlistener
    IntPtr authContext,   // void* in/out
    int accept,   // INT
    IntPtr credentials   // alljoyn_credentials
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_authlistener_requestcredentialsresponse(
    listener As IntPtr,   ' alljoyn_authlistener
    authContext As IntPtr,   ' void* in/out
    accept As Integer,   ' INT
    credentials As IntPtr   ' alljoyn_credentials
) As Integer
End Function
' listener : alljoyn_authlistener
' authContext : void* in/out
' accept : INT
' credentials : alljoyn_credentials
Declare PtrSafe Function alljoyn_authlistener_requestcredentialsresponse Lib "msajapi" ( _
    ByVal listener As LongPtr, _
    ByVal authContext As LongPtr, _
    ByVal accept As Long, _
    ByVal credentials As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_authlistener_requestcredentialsresponse = ctypes.windll.msajapi.alljoyn_authlistener_requestcredentialsresponse
alljoyn_authlistener_requestcredentialsresponse.restype = ctypes.c_int
alljoyn_authlistener_requestcredentialsresponse.argtypes = [
    ctypes.c_ssize_t,  # listener : alljoyn_authlistener
    ctypes.POINTER(None),  # authContext : void* in/out
    ctypes.c_int,  # accept : INT
    ctypes.c_ssize_t,  # credentials : alljoyn_credentials
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_authlistener_requestcredentialsresponse = msajapi.NewProc("alljoyn_authlistener_requestcredentialsresponse")
)

// listener (alljoyn_authlistener), authContext (void* in/out), accept (INT), credentials (alljoyn_credentials)
r1, _, err := procalljoyn_authlistener_requestcredentialsresponse.Call(
	uintptr(listener),
	uintptr(authContext),
	uintptr(accept),
	uintptr(credentials),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // QStatus
function alljoyn_authlistener_requestcredentialsresponse(
  listener: NativeInt;   // alljoyn_authlistener
  authContext: Pointer;   // void* in/out
  accept: Integer;   // INT
  credentials: NativeInt   // alljoyn_credentials
): Integer; stdcall;
  external 'MSAJApi.dll' name 'alljoyn_authlistener_requestcredentialsresponse';
result := DllCall("MSAJApi\alljoyn_authlistener_requestcredentialsresponse"
    , "Ptr", listener   ; alljoyn_authlistener
    , "Ptr", authContext   ; void* in/out
    , "Int", accept   ; INT
    , "Ptr", credentials   ; alljoyn_credentials
    , "Int")   ; return: QStatus
●alljoyn_authlistener_requestcredentialsresponse(listener, authContext, accept, credentials) = DLL("MSAJApi.dll", "int alljoyn_authlistener_requestcredentialsresponse(int, void*, int, int)")
# 呼び出し: alljoyn_authlistener_requestcredentialsresponse(listener, authContext, accept, credentials)
# listener : alljoyn_authlistener -> "int"
# authContext : void* in/out -> "void*"
# accept : INT -> "int"
# credentials : alljoyn_credentials -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。