ホーム › Devices.AllJoyn › alljoyn_authlistener_verifycredentialsresponse
alljoyn_authlistener_verifycredentialsresponse
関数資格情報検証コールバックに対し非同期で検証結果を応答する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
QStatus alljoyn_authlistener_verifycredentialsresponse(
alljoyn_authlistener listener,
void* authContext,
INT accept
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| listener | alljoyn_authlistener | in | 応答を返す対象の認証リスナーハンドル。 |
| authContext | void* | inout | 対応する検証要求を識別するコンテキストポインタ。 |
| accept | INT | in | 資格情報の検証を受諾するか否か。非0で受諾、0で拒否。 |
戻り値の型: QStatus
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
QStatus alljoyn_authlistener_verifycredentialsresponse(
alljoyn_authlistener listener,
void* authContext,
INT accept
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_authlistener_verifycredentialsresponse(
IntPtr listener, // alljoyn_authlistener
IntPtr authContext, // void* in/out
int accept // INT
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_authlistener_verifycredentialsresponse(
listener As IntPtr, ' alljoyn_authlistener
authContext As IntPtr, ' void* in/out
accept As Integer ' INT
) As Integer
End Function' listener : alljoyn_authlistener
' authContext : void* in/out
' accept : INT
Declare PtrSafe Function alljoyn_authlistener_verifycredentialsresponse Lib "msajapi" ( _
ByVal listener As LongPtr, _
ByVal authContext As LongPtr, _
ByVal accept As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_authlistener_verifycredentialsresponse = ctypes.windll.msajapi.alljoyn_authlistener_verifycredentialsresponse
alljoyn_authlistener_verifycredentialsresponse.restype = ctypes.c_int
alljoyn_authlistener_verifycredentialsresponse.argtypes = [
ctypes.c_ssize_t, # listener : alljoyn_authlistener
ctypes.POINTER(None), # authContext : void* in/out
ctypes.c_int, # accept : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_authlistener_verifycredentialsresponse = Fiddle::Function.new(
lib['alljoyn_authlistener_verifycredentialsresponse'],
[
Fiddle::TYPE_INTPTR_T, # listener : alljoyn_authlistener
Fiddle::TYPE_VOIDP, # authContext : void* in/out
Fiddle::TYPE_INT, # accept : INT
],
Fiddle::TYPE_INT)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_authlistener_verifycredentialsresponse(
listener: isize, // alljoyn_authlistener
authContext: *mut (), // void* in/out
accept: i32 // INT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern int alljoyn_authlistener_verifycredentialsresponse(IntPtr listener, IntPtr authContext, int accept);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_authlistener_verifycredentialsresponse' -Namespace Win32 -PassThru
# $api::alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)#uselib "MSAJApi.dll"
#func global alljoyn_authlistener_verifycredentialsresponse "alljoyn_authlistener_verifycredentialsresponse" sptr, sptr, sptr
; alljoyn_authlistener_verifycredentialsresponse listener, authContext, accept ; 戻り値は stat
; listener : alljoyn_authlistener -> "sptr"
; authContext : void* in/out -> "sptr"
; accept : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global alljoyn_authlistener_verifycredentialsresponse "alljoyn_authlistener_verifycredentialsresponse" sptr, sptr, int
; res = alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)
; listener : alljoyn_authlistener -> "sptr"
; authContext : void* in/out -> "sptr"
; accept : INT -> "int"; QStatus alljoyn_authlistener_verifycredentialsresponse(alljoyn_authlistener listener, void* authContext, INT accept)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_authlistener_verifycredentialsresponse "alljoyn_authlistener_verifycredentialsresponse" intptr, intptr, int
; res = alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)
; listener : alljoyn_authlistener -> "intptr"
; authContext : void* in/out -> "intptr"
; accept : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_authlistener_verifycredentialsresponse = msajapi.NewProc("alljoyn_authlistener_verifycredentialsresponse")
)
// listener (alljoyn_authlistener), authContext (void* in/out), accept (INT)
r1, _, err := procalljoyn_authlistener_verifycredentialsresponse.Call(
uintptr(listener),
uintptr(authContext),
uintptr(accept),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // QStatusfunction alljoyn_authlistener_verifycredentialsresponse(
listener: NativeInt; // alljoyn_authlistener
authContext: Pointer; // void* in/out
accept: Integer // INT
): Integer; stdcall;
external 'MSAJApi.dll' name 'alljoyn_authlistener_verifycredentialsresponse';result := DllCall("MSAJApi\alljoyn_authlistener_verifycredentialsresponse"
, "Ptr", listener ; alljoyn_authlistener
, "Ptr", authContext ; void* in/out
, "Int", accept ; INT
, "Int") ; return: QStatus●alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept) = DLL("MSAJApi.dll", "int alljoyn_authlistener_verifycredentialsresponse(int, void*, int)")
# 呼び出し: alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)
# listener : alljoyn_authlistener -> "int"
# authContext : void* in/out -> "void*"
# accept : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "msajapi" fn alljoyn_authlistener_verifycredentialsresponse(
listener: isize, // alljoyn_authlistener
authContext: ?*anyopaque, // void* in/out
accept: i32 // INT
) callconv(std.os.windows.WINAPI) i32;proc alljoyn_authlistener_verifycredentialsresponse(
listener: int, # alljoyn_authlistener
authContext: pointer, # void* in/out
accept: int32 # INT
): int32 {.importc: "alljoyn_authlistener_verifycredentialsresponse", stdcall, dynlib: "MSAJApi.dll".}pragma(lib, "msajapi");
extern(Windows)
int alljoyn_authlistener_verifycredentialsresponse(
ptrdiff_t listener, // alljoyn_authlistener
void* authContext, // void* in/out
int accept // INT
);ccall((:alljoyn_authlistener_verifycredentialsresponse, "MSAJApi.dll"), stdcall, Int32,
(Int, Ptr{Cvoid}, Int32),
listener, authContext, accept)
# listener : alljoyn_authlistener -> Int
# authContext : void* in/out -> Ptr{Cvoid}
# accept : INT -> Int32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t alljoyn_authlistener_verifycredentialsresponse(
intptr_t listener,
void* authContext,
int32_t accept);
]]
local msajapi = ffi.load("msajapi")
-- msajapi.alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)
-- listener : alljoyn_authlistener
-- authContext : void* in/out
-- accept : INT
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('MSAJApi.dll');
const alljoyn_authlistener_verifycredentialsresponse = lib.func('__stdcall', 'alljoyn_authlistener_verifycredentialsresponse', 'int32_t', ['intptr_t', 'void *', 'int32_t']);
// alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)
// listener : alljoyn_authlistener -> 'intptr_t'
// authContext : void* in/out -> 'void *'
// accept : INT -> 'int32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("MSAJApi.dll", {
alljoyn_authlistener_verifycredentialsresponse: { parameters: ["isize", "pointer", "i32"], result: "i32" },
});
// lib.symbols.alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept)
// listener : alljoyn_authlistener -> "isize"
// authContext : void* in/out -> "pointer"
// accept : INT -> "i32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t alljoyn_authlistener_verifycredentialsresponse(
intptr_t listener,
void* authContext,
int32_t accept);
C, "MSAJApi.dll");
// $ffi->alljoyn_authlistener_verifycredentialsresponse(listener, authContext, accept);
// listener : alljoyn_authlistener
// authContext : void* in/out
// accept : INT
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Msajapi extends StdCallLibrary {
Msajapi INSTANCE = Native.load("msajapi", Msajapi.class);
int alljoyn_authlistener_verifycredentialsresponse(
long listener, // alljoyn_authlistener
Pointer authContext, // void* in/out
int accept // INT
);
}@[Link("msajapi")]
lib LibMSAJApi
fun alljoyn_authlistener_verifycredentialsresponse = alljoyn_authlistener_verifycredentialsresponse(
listener : LibC::SSizeT, # alljoyn_authlistener
authContext : Void*, # void* in/out
accept : Int32 # INT
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef alljoyn_authlistener_verifycredentialsresponseNative = Int32 Function(IntPtr, Pointer<Void>, Int32);
typedef alljoyn_authlistener_verifycredentialsresponseDart = int Function(int, Pointer<Void>, int);
final alljoyn_authlistener_verifycredentialsresponse = DynamicLibrary.open('MSAJApi.dll')
.lookupFunction<alljoyn_authlistener_verifycredentialsresponseNative, alljoyn_authlistener_verifycredentialsresponseDart>('alljoyn_authlistener_verifycredentialsresponse');
// listener : alljoyn_authlistener -> IntPtr
// authContext : void* in/out -> Pointer<Void>
// accept : INT -> Int32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function alljoyn_authlistener_verifycredentialsresponse(
listener: NativeInt; // alljoyn_authlistener
authContext: Pointer; // void* in/out
accept: Integer // INT
): Integer; stdcall;
external 'MSAJApi.dll' name 'alljoyn_authlistener_verifycredentialsresponse';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "alljoyn_authlistener_verifycredentialsresponse"
c_alljoyn_authlistener_verifycredentialsresponse :: CIntPtr -> Ptr () -> Int32 -> IO Int32
-- listener : alljoyn_authlistener -> CIntPtr
-- authContext : void* in/out -> Ptr ()
-- accept : INT -> Int32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let alljoyn_authlistener_verifycredentialsresponse =
foreign "alljoyn_authlistener_verifycredentialsresponse"
(intptr_t @-> (ptr void) @-> int32_t @-> returning int32_t)
(* listener : alljoyn_authlistener -> intptr_t *)
(* authContext : void* in/out -> (ptr void) *)
(* accept : INT -> int32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library msajapi (t "MSAJApi.dll"))
(cffi:use-foreign-library msajapi)
(cffi:defcfun ("alljoyn_authlistener_verifycredentialsresponse" alljoyn-authlistener-verifycredentialsresponse :convention :stdcall) :int32
(listener :int64) ; alljoyn_authlistener
(auth-context :pointer) ; void* in/out
(accept :int32)) ; INT
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $alljoyn_authlistener_verifycredentialsresponse = Win32::API::More->new('MSAJApi',
'int alljoyn_authlistener_verifycredentialsresponse(LPARAM listener, LPVOID authContext, int accept)');
# my $ret = $alljoyn_authlistener_verifycredentialsresponse->Call($listener, $authContext, $accept);
# listener : alljoyn_authlistener -> LPARAM
# authContext : void* in/out -> LPVOID
# accept : INT -> int
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
使用する型