ShowTitleAchievementsUIForUser
関数指定ユーザー向けにタイトル実績UIを表示する。
シグネチャ
// api-ms-win-gaming-tcui-l1-1-2.dll
#include <windows.h>
HRESULT ShowTitleAchievementsUIForUser(
IInspectable* user,
DWORD titleId,
GameUICompletionRoutine completionRoutine,
void* context // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| user | IInspectable* | in |
| titleId | DWORD | in |
| completionRoutine | GameUICompletionRoutine | in |
| context | void* | inoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// api-ms-win-gaming-tcui-l1-1-2.dll
#include <windows.h>
HRESULT ShowTitleAchievementsUIForUser(
IInspectable* user,
DWORD titleId,
GameUICompletionRoutine completionRoutine,
void* context // optional
);[DllImport("api-ms-win-gaming-tcui-l1-1-2.dll", ExactSpelling = true)]
static extern int ShowTitleAchievementsUIForUser(
IntPtr user, // IInspectable*
uint titleId, // DWORD
IntPtr completionRoutine, // GameUICompletionRoutine
IntPtr context // void* optional
);<DllImport("api-ms-win-gaming-tcui-l1-1-2.dll", ExactSpelling:=True)>
Public Shared Function ShowTitleAchievementsUIForUser(
user As IntPtr, ' IInspectable*
titleId As UInteger, ' DWORD
completionRoutine As IntPtr, ' GameUICompletionRoutine
context As IntPtr ' void* optional
) As Integer
End Function' user : IInspectable*
' titleId : DWORD
' completionRoutine : GameUICompletionRoutine
' context : void* optional
Declare PtrSafe Function ShowTitleAchievementsUIForUser Lib "api-ms-win-gaming-tcui-l1-1-2" ( _
ByVal user As LongPtr, _
ByVal titleId As Long, _
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
ShowTitleAchievementsUIForUser = ctypes.windll.LoadLibrary("api-ms-win-gaming-tcui-l1-1-2.dll").ShowTitleAchievementsUIForUser
ShowTitleAchievementsUIForUser.restype = ctypes.c_int
ShowTitleAchievementsUIForUser.argtypes = [
ctypes.c_void_p, # user : IInspectable*
wintypes.DWORD, # titleId : DWORD
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')
ShowTitleAchievementsUIForUser = Fiddle::Function.new(
lib['ShowTitleAchievementsUIForUser'],
[
Fiddle::TYPE_VOIDP, # user : IInspectable*
-Fiddle::TYPE_INT, # titleId : DWORD
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 ShowTitleAchievementsUIForUser(
user: *mut core::ffi::c_void, // IInspectable*
titleId: u32, // DWORD
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 ShowTitleAchievementsUIForUser(IntPtr user, uint titleId, IntPtr completionRoutine, IntPtr context);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-gaming-tcui-l1-1-2_ShowTitleAchievementsUIForUser' -Namespace Win32 -PassThru
# $api::ShowTitleAchievementsUIForUser(user, titleId, completionRoutine, context)#uselib "api-ms-win-gaming-tcui-l1-1-2.dll"
#func global ShowTitleAchievementsUIForUser "ShowTitleAchievementsUIForUser" sptr, sptr, sptr, sptr
; ShowTitleAchievementsUIForUser user, titleId, completionRoutine, context ; 戻り値は stat
; user : IInspectable* -> "sptr"
; titleId : DWORD -> "sptr"
; completionRoutine : GameUICompletionRoutine -> "sptr"
; context : void* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "api-ms-win-gaming-tcui-l1-1-2.dll"
#cfunc global ShowTitleAchievementsUIForUser "ShowTitleAchievementsUIForUser" sptr, int, sptr, sptr
; res = ShowTitleAchievementsUIForUser(user, titleId, completionRoutine, context)
; user : IInspectable* -> "sptr"
; titleId : DWORD -> "int"
; completionRoutine : GameUICompletionRoutine -> "sptr"
; context : void* optional -> "sptr"; HRESULT ShowTitleAchievementsUIForUser(IInspectable* user, DWORD titleId, GameUICompletionRoutine completionRoutine, void* context)
#uselib "api-ms-win-gaming-tcui-l1-1-2.dll"
#cfunc global ShowTitleAchievementsUIForUser "ShowTitleAchievementsUIForUser" intptr, int, intptr, intptr
; res = ShowTitleAchievementsUIForUser(user, titleId, completionRoutine, context)
; user : IInspectable* -> "intptr"
; titleId : DWORD -> "int"
; 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")
procShowTitleAchievementsUIForUser = api_ms_win_gaming_tcui_l1_1_2.NewProc("ShowTitleAchievementsUIForUser")
)
// user (IInspectable*), titleId (DWORD), completionRoutine (GameUICompletionRoutine), context (void* optional)
r1, _, err := procShowTitleAchievementsUIForUser.Call(
uintptr(user),
uintptr(titleId),
uintptr(completionRoutine),
uintptr(context),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction ShowTitleAchievementsUIForUser(
user: Pointer; // IInspectable*
titleId: DWORD; // DWORD
completionRoutine: Pointer; // GameUICompletionRoutine
context: Pointer // void* optional
): Integer; stdcall;
external 'api-ms-win-gaming-tcui-l1-1-2.dll' name 'ShowTitleAchievementsUIForUser';result := DllCall("api-ms-win-gaming-tcui-l1-1-2\ShowTitleAchievementsUIForUser"
, "Ptr", user ; IInspectable*
, "UInt", titleId ; DWORD
, "Ptr", completionRoutine ; GameUICompletionRoutine
, "Ptr", context ; void* optional
, "Int") ; return: HRESULT●ShowTitleAchievementsUIForUser(user, titleId, completionRoutine, context) = DLL("api-ms-win-gaming-tcui-l1-1-2.dll", "int ShowTitleAchievementsUIForUser(void*, dword, void*, void*)")
# 呼び出し: ShowTitleAchievementsUIForUser(user, titleId, completionRoutine, context)
# user : IInspectable* -> "void*"
# titleId : DWORD -> "dword"
# completionRoutine : GameUICompletionRoutine -> "void*"
# context : void* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。