ShowProfileCardUIForUser
関数指定ユーザー向けにプロフィールカードUIを表示する。
シグネチャ
// api-ms-win-gaming-tcui-l1-1-2.dll
#include <windows.h>
HRESULT ShowProfileCardUIForUser(
IInspectable* user,
HSTRING targetUserXuid,
GameUICompletionRoutine completionRoutine,
void* context // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| user | IInspectable* | in |
| targetUserXuid | HSTRING | in |
| completionRoutine | GameUICompletionRoutine | in |
| context | void* | inoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// api-ms-win-gaming-tcui-l1-1-2.dll
#include <windows.h>
HRESULT ShowProfileCardUIForUser(
IInspectable* user,
HSTRING targetUserXuid,
GameUICompletionRoutine completionRoutine,
void* context // optional
);[DllImport("api-ms-win-gaming-tcui-l1-1-2.dll", ExactSpelling = true)]
static extern int ShowProfileCardUIForUser(
IntPtr user, // IInspectable*
IntPtr targetUserXuid, // HSTRING
IntPtr completionRoutine, // GameUICompletionRoutine
IntPtr context // void* optional
);<DllImport("api-ms-win-gaming-tcui-l1-1-2.dll", ExactSpelling:=True)>
Public Shared Function ShowProfileCardUIForUser(
user As IntPtr, ' IInspectable*
targetUserXuid As IntPtr, ' HSTRING
completionRoutine As IntPtr, ' GameUICompletionRoutine
context As IntPtr ' void* optional
) As Integer
End Function' user : IInspectable*
' targetUserXuid : HSTRING
' completionRoutine : GameUICompletionRoutine
' context : void* optional
Declare PtrSafe Function ShowProfileCardUIForUser Lib "api-ms-win-gaming-tcui-l1-1-2" ( _
ByVal user As LongPtr, _
ByVal targetUserXuid As LongPtr, _
ByVal completionRoutine As LongPtr, _
ByVal context As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ShowProfileCardUIForUser = ctypes.windll.LoadLibrary("api-ms-win-gaming-tcui-l1-1-2.dll").ShowProfileCardUIForUser
ShowProfileCardUIForUser.restype = ctypes.c_int
ShowProfileCardUIForUser.argtypes = [
ctypes.c_void_p, # user : IInspectable*
wintypes.HANDLE, # targetUserXuid : HSTRING
ctypes.c_void_p, # completionRoutine : GameUICompletionRoutine
ctypes.POINTER(None), # context : void* optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-gaming-tcui-l1-1-2.dll')
ShowProfileCardUIForUser = Fiddle::Function.new(
lib['ShowProfileCardUIForUser'],
[
Fiddle::TYPE_VOIDP, # user : IInspectable*
Fiddle::TYPE_VOIDP, # targetUserXuid : HSTRING
Fiddle::TYPE_VOIDP, # completionRoutine : GameUICompletionRoutine
Fiddle::TYPE_VOIDP, # context : void* optional
],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-gaming-tcui-l1-1-2")]
extern "system" {
fn ShowProfileCardUIForUser(
user: *mut core::ffi::c_void, // IInspectable*
targetUserXuid: *mut core::ffi::c_void, // HSTRING
completionRoutine: *const core::ffi::c_void, // GameUICompletionRoutine
context: *mut () // void* optional
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("api-ms-win-gaming-tcui-l1-1-2.dll")]
public static extern int ShowProfileCardUIForUser(IntPtr user, IntPtr targetUserXuid, IntPtr completionRoutine, IntPtr context);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-gaming-tcui-l1-1-2_ShowProfileCardUIForUser' -Namespace Win32 -PassThru
# $api::ShowProfileCardUIForUser(user, targetUserXuid, completionRoutine, context)#uselib "api-ms-win-gaming-tcui-l1-1-2.dll"
#func global ShowProfileCardUIForUser "ShowProfileCardUIForUser" sptr, sptr, sptr, sptr
; ShowProfileCardUIForUser user, targetUserXuid, completionRoutine, context ; 戻り値は stat
; user : IInspectable* -> "sptr"
; targetUserXuid : HSTRING -> "sptr"
; completionRoutine : GameUICompletionRoutine -> "sptr"
; context : void* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "api-ms-win-gaming-tcui-l1-1-2.dll"
#cfunc global ShowProfileCardUIForUser "ShowProfileCardUIForUser" sptr, sptr, sptr, sptr
; res = ShowProfileCardUIForUser(user, targetUserXuid, completionRoutine, context)
; user : IInspectable* -> "sptr"
; targetUserXuid : HSTRING -> "sptr"
; completionRoutine : GameUICompletionRoutine -> "sptr"
; context : void* optional -> "sptr"; HRESULT ShowProfileCardUIForUser(IInspectable* user, HSTRING targetUserXuid, GameUICompletionRoutine completionRoutine, void* context)
#uselib "api-ms-win-gaming-tcui-l1-1-2.dll"
#cfunc global ShowProfileCardUIForUser "ShowProfileCardUIForUser" intptr, intptr, intptr, intptr
; res = ShowProfileCardUIForUser(user, targetUserXuid, completionRoutine, context)
; user : IInspectable* -> "intptr"
; targetUserXuid : HSTRING -> "intptr"
; completionRoutine : GameUICompletionRoutine -> "intptr"
; context : void* optional -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
api_ms_win_gaming_tcui_l1_1_2 = windows.NewLazySystemDLL("api-ms-win-gaming-tcui-l1-1-2.dll")
procShowProfileCardUIForUser = api_ms_win_gaming_tcui_l1_1_2.NewProc("ShowProfileCardUIForUser")
)
// user (IInspectable*), targetUserXuid (HSTRING), completionRoutine (GameUICompletionRoutine), context (void* optional)
r1, _, err := procShowProfileCardUIForUser.Call(
uintptr(user),
uintptr(targetUserXuid),
uintptr(completionRoutine),
uintptr(context),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction ShowProfileCardUIForUser(
user: Pointer; // IInspectable*
targetUserXuid: THandle; // HSTRING
completionRoutine: Pointer; // GameUICompletionRoutine
context: Pointer // void* optional
): Integer; stdcall;
external 'api-ms-win-gaming-tcui-l1-1-2.dll' name 'ShowProfileCardUIForUser';result := DllCall("api-ms-win-gaming-tcui-l1-1-2\ShowProfileCardUIForUser"
, "Ptr", user ; IInspectable*
, "Ptr", targetUserXuid ; HSTRING
, "Ptr", completionRoutine ; GameUICompletionRoutine
, "Ptr", context ; void* optional
, "Int") ; return: HRESULT●ShowProfileCardUIForUser(user, targetUserXuid, completionRoutine, context) = DLL("api-ms-win-gaming-tcui-l1-1-2.dll", "int ShowProfileCardUIForUser(void*, void*, void*, void*)")
# 呼び出し: ShowProfileCardUIForUser(user, targetUserXuid, completionRoutine, context)
# user : IInspectable* -> "void*"
# targetUserXuid : HSTRING -> "void*"
# completionRoutine : GameUICompletionRoutine -> "void*"
# context : void* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。