Win32 API 日本語リファレンス
ホームGaming › ShowUserSettingsUIForUser

ShowUserSettingsUIForUser

関数
指定ユーザー向けにユーザー設定UIを表示する。
DLLapi-ms-win-gaming-tcui-l1-1-4.dll呼出規約winapi

シグネチャ

// api-ms-win-gaming-tcui-l1-1-4.dll
#include <windows.h>

HRESULT ShowUserSettingsUIForUser(
    IInspectable* user,
    GameUICompletionRoutine completionRoutine,
    void* context   // optional
);

パラメーター

名前方向
userIInspectable*in
completionRoutineGameUICompletionRoutinein
contextvoid*inoptional

戻り値の型: HRESULT

各言語での呼び出し定義

// api-ms-win-gaming-tcui-l1-1-4.dll
#include <windows.h>

HRESULT ShowUserSettingsUIForUser(
    IInspectable* user,
    GameUICompletionRoutine completionRoutine,
    void* context   // optional
);
[DllImport("api-ms-win-gaming-tcui-l1-1-4.dll", ExactSpelling = true)]
static extern int ShowUserSettingsUIForUser(
    IntPtr user,   // IInspectable*
    IntPtr completionRoutine,   // GameUICompletionRoutine
    IntPtr context   // void* optional
);
<DllImport("api-ms-win-gaming-tcui-l1-1-4.dll", ExactSpelling:=True)>
Public Shared Function ShowUserSettingsUIForUser(
    user As IntPtr,   ' IInspectable*
    completionRoutine As IntPtr,   ' GameUICompletionRoutine
    context As IntPtr   ' void* optional
) As Integer
End Function
' user : IInspectable*
' completionRoutine : GameUICompletionRoutine
' context : void* optional
Declare PtrSafe Function ShowUserSettingsUIForUser Lib "api-ms-win-gaming-tcui-l1-1-4" ( _
    ByVal user 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

ShowUserSettingsUIForUser = ctypes.windll.LoadLibrary("api-ms-win-gaming-tcui-l1-1-4.dll").ShowUserSettingsUIForUser
ShowUserSettingsUIForUser.restype = ctypes.c_int
ShowUserSettingsUIForUser.argtypes = [
    ctypes.c_void_p,  # user : IInspectable*
    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-4.dll')
ShowUserSettingsUIForUser = Fiddle::Function.new(
  lib['ShowUserSettingsUIForUser'],
  [
    Fiddle::TYPE_VOIDP,  # user : IInspectable*
    Fiddle::TYPE_VOIDP,  # completionRoutine : GameUICompletionRoutine
    Fiddle::TYPE_VOIDP,  # context : void* optional
  ],
  Fiddle::TYPE_INT)
#[link(name = "api-ms-win-gaming-tcui-l1-1-4")]
extern "system" {
    fn ShowUserSettingsUIForUser(
        user: *mut core::ffi::c_void,  // IInspectable*
        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-4.dll")]
public static extern int ShowUserSettingsUIForUser(IntPtr user, IntPtr completionRoutine, IntPtr context);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-gaming-tcui-l1-1-4_ShowUserSettingsUIForUser' -Namespace Win32 -PassThru
# $api::ShowUserSettingsUIForUser(user, completionRoutine, context)
#uselib "api-ms-win-gaming-tcui-l1-1-4.dll"
#func global ShowUserSettingsUIForUser "ShowUserSettingsUIForUser" sptr, sptr, sptr
; ShowUserSettingsUIForUser user, completionRoutine, context   ; 戻り値は stat
; user : IInspectable* -> "sptr"
; completionRoutine : GameUICompletionRoutine -> "sptr"
; context : void* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "api-ms-win-gaming-tcui-l1-1-4.dll"
#cfunc global ShowUserSettingsUIForUser "ShowUserSettingsUIForUser" sptr, sptr, sptr
; res = ShowUserSettingsUIForUser(user, completionRoutine, context)
; user : IInspectable* -> "sptr"
; completionRoutine : GameUICompletionRoutine -> "sptr"
; context : void* optional -> "sptr"
; HRESULT ShowUserSettingsUIForUser(IInspectable* user, GameUICompletionRoutine completionRoutine, void* context)
#uselib "api-ms-win-gaming-tcui-l1-1-4.dll"
#cfunc global ShowUserSettingsUIForUser "ShowUserSettingsUIForUser" intptr, intptr, intptr
; res = ShowUserSettingsUIForUser(user, completionRoutine, context)
; user : IInspectable* -> "intptr"
; completionRoutine : GameUICompletionRoutine -> "intptr"
; context : void* optional -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	api_ms_win_gaming_tcui_l1_1_4 = windows.NewLazySystemDLL("api-ms-win-gaming-tcui-l1-1-4.dll")
	procShowUserSettingsUIForUser = api_ms_win_gaming_tcui_l1_1_4.NewProc("ShowUserSettingsUIForUser")
)

// user (IInspectable*), completionRoutine (GameUICompletionRoutine), context (void* optional)
r1, _, err := procShowUserSettingsUIForUser.Call(
	uintptr(user),
	uintptr(completionRoutine),
	uintptr(context),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function ShowUserSettingsUIForUser(
  user: Pointer;   // IInspectable*
  completionRoutine: Pointer;   // GameUICompletionRoutine
  context: Pointer   // void* optional
): Integer; stdcall;
  external 'api-ms-win-gaming-tcui-l1-1-4.dll' name 'ShowUserSettingsUIForUser';
result := DllCall("api-ms-win-gaming-tcui-l1-1-4\ShowUserSettingsUIForUser"
    , "Ptr", user   ; IInspectable*
    , "Ptr", completionRoutine   ; GameUICompletionRoutine
    , "Ptr", context   ; void* optional
    , "Int")   ; return: HRESULT
●ShowUserSettingsUIForUser(user, completionRoutine, context) = DLL("api-ms-win-gaming-tcui-l1-1-4.dll", "int ShowUserSettingsUIForUser(void*, void*, void*)")
# 呼び出し: ShowUserSettingsUIForUser(user, completionRoutine, context)
# user : IInspectable* -> "void*"
# completionRoutine : GameUICompletionRoutine -> "void*"
# context : void* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。