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

alljoyn_abouticonobj_create

関数
Aboutアイコンを公開するアイコンバスオブジェクトを生成する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

alljoyn_abouticonobj alljoyn_abouticonobj_create(
    alljoyn_busattachment bus,
    alljoyn_abouticon icon
);

パラメーター

名前方向説明
busalljoyn_busattachmentinアイコンオブジェクトを公開する対象のバスアタッチメントハンドル。
iconalljoyn_abouticonin公開するアイコン情報を保持するAboutアイコンハンドル。

戻り値の型: alljoyn_abouticonobj

各言語での呼び出し定義

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

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

alljoyn_abouticonobj_create = ctypes.windll.msajapi.alljoyn_abouticonobj_create
alljoyn_abouticonobj_create.restype = ctypes.c_ssize_t
alljoyn_abouticonobj_create.argtypes = [
    ctypes.c_ssize_t,  # bus : alljoyn_busattachment
    ctypes.c_ssize_t,  # icon : alljoyn_abouticon
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_abouticonobj_create = msajapi.NewProc("alljoyn_abouticonobj_create")
)

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