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

ProcessPendingGameUI

関数
保留中のゲームUI処理を実行する。
DLLapi-ms-win-gaming-tcui-l1-1-0.dll呼出規約winapi

シグネチャ

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

HRESULT ProcessPendingGameUI(
    BOOL waitForCompletion
);

パラメーター

名前方向説明
waitForCompletionBOOLin保留中のゲームUI処理が完了するまで待機するか。TRUEで待機する。

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT ProcessPendingGameUI(
    BOOL waitForCompletion
);
[DllImport("api-ms-win-gaming-tcui-l1-1-0.dll", ExactSpelling = true)]
static extern int ProcessPendingGameUI(
    bool waitForCompletion   // BOOL
);
<DllImport("api-ms-win-gaming-tcui-l1-1-0.dll", ExactSpelling:=True)>
Public Shared Function ProcessPendingGameUI(
    waitForCompletion As Boolean   ' BOOL
) As Integer
End Function
' waitForCompletion : BOOL
Declare PtrSafe Function ProcessPendingGameUI Lib "api-ms-win-gaming-tcui-l1-1-0" ( _
    ByVal waitForCompletion As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ProcessPendingGameUI = ctypes.windll.LoadLibrary("api-ms-win-gaming-tcui-l1-1-0.dll").ProcessPendingGameUI
ProcessPendingGameUI.restype = ctypes.c_int
ProcessPendingGameUI.argtypes = [
    wintypes.BOOL,  # waitForCompletion : BOOL
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('api-ms-win-gaming-tcui-l1-1-0.dll')
ProcessPendingGameUI = Fiddle::Function.new(
  lib['ProcessPendingGameUI'],
  [
    Fiddle::TYPE_INT,  # waitForCompletion : BOOL
  ],
  Fiddle::TYPE_INT)
#[link(name = "api-ms-win-gaming-tcui-l1-1-0")]
extern "system" {
    fn ProcessPendingGameUI(
        waitForCompletion: i32  // BOOL
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("api-ms-win-gaming-tcui-l1-1-0.dll")]
public static extern int ProcessPendingGameUI(bool waitForCompletion);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-gaming-tcui-l1-1-0_ProcessPendingGameUI' -Namespace Win32 -PassThru
# $api::ProcessPendingGameUI(waitForCompletion)
#uselib "api-ms-win-gaming-tcui-l1-1-0.dll"
#func global ProcessPendingGameUI "ProcessPendingGameUI" sptr
; ProcessPendingGameUI waitForCompletion   ; 戻り値は stat
; waitForCompletion : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "api-ms-win-gaming-tcui-l1-1-0.dll"
#cfunc global ProcessPendingGameUI "ProcessPendingGameUI" int
; res = ProcessPendingGameUI(waitForCompletion)
; waitForCompletion : BOOL -> "int"
; HRESULT ProcessPendingGameUI(BOOL waitForCompletion)
#uselib "api-ms-win-gaming-tcui-l1-1-0.dll"
#cfunc global ProcessPendingGameUI "ProcessPendingGameUI" int
; res = ProcessPendingGameUI(waitForCompletion)
; waitForCompletion : BOOL -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	api_ms_win_gaming_tcui_l1_1_0 = windows.NewLazySystemDLL("api-ms-win-gaming-tcui-l1-1-0.dll")
	procProcessPendingGameUI = api_ms_win_gaming_tcui_l1_1_0.NewProc("ProcessPendingGameUI")
)

// waitForCompletion (BOOL)
r1, _, err := procProcessPendingGameUI.Call(
	uintptr(waitForCompletion),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function ProcessPendingGameUI(
  waitForCompletion: BOOL   // BOOL
): Integer; stdcall;
  external 'api-ms-win-gaming-tcui-l1-1-0.dll' name 'ProcessPendingGameUI';
result := DllCall("api-ms-win-gaming-tcui-l1-1-0\ProcessPendingGameUI"
    , "Int", waitForCompletion   ; BOOL
    , "Int")   ; return: HRESULT
●ProcessPendingGameUI(waitForCompletion) = DLL("api-ms-win-gaming-tcui-l1-1-0.dll", "int ProcessPendingGameUI(bool)")
# 呼び出し: ProcessPendingGameUI(waitForCompletion)
# waitForCompletion : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
const std = @import("std");

extern "api-ms-win-gaming-tcui-l1-1-0" fn ProcessPendingGameUI(
    waitForCompletion: i32 // BOOL
) callconv(std.os.windows.WINAPI) i32;
proc ProcessPendingGameUI(
    waitForCompletion: int32  # BOOL
): int32 {.importc: "ProcessPendingGameUI", stdcall, dynlib: "api-ms-win-gaming-tcui-l1-1-0.dll".}
pragma(lib, "api-ms-win-gaming-tcui-l1-1-0");
extern(Windows)
int ProcessPendingGameUI(
    int waitForCompletion   // BOOL
);
ccall((:ProcessPendingGameUI, "api-ms-win-gaming-tcui-l1-1-0.dll"), stdcall, Int32,
      (Int32,),
      waitForCompletion)
# waitForCompletion : BOOL -> Int32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
int32_t ProcessPendingGameUI(
    int32_t waitForCompletion);
]]
local api-ms-win-gaming-tcui-l1-1-0 = ffi.load("api-ms-win-gaming-tcui-l1-1-0")
-- api-ms-win-gaming-tcui-l1-1-0.ProcessPendingGameUI(waitForCompletion)
-- waitForCompletion : BOOL
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('api-ms-win-gaming-tcui-l1-1-0.dll');
const ProcessPendingGameUI = lib.func('__stdcall', 'ProcessPendingGameUI', 'int32_t', ['int32_t']);
// ProcessPendingGameUI(waitForCompletion)
// waitForCompletion : BOOL -> 'int32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("api-ms-win-gaming-tcui-l1-1-0.dll", {
  ProcessPendingGameUI: { parameters: ["i32"], result: "i32" },
});
// lib.symbols.ProcessPendingGameUI(waitForCompletion)
// waitForCompletion : BOOL -> "i32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
int32_t ProcessPendingGameUI(
    int32_t waitForCompletion);
C, "api-ms-win-gaming-tcui-l1-1-0.dll");
// $ffi->ProcessPendingGameUI(waitForCompletion);
// waitForCompletion : BOOL
// 構造体/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 Api-ms-win-gaming-tcui-l1-1-0 extends StdCallLibrary {
    Api-ms-win-gaming-tcui-l1-1-0 INSTANCE = Native.load("api-ms-win-gaming-tcui-l1-1-0", Api-ms-win-gaming-tcui-l1-1-0.class);
    int ProcessPendingGameUI(
        boolean waitForCompletion   // BOOL
    );
}
@[Link("api-ms-win-gaming-tcui-l1-1-0")]
lib Libapi-ms-win-gaming-tcui-l1-1-0
  fun ProcessPendingGameUI = ProcessPendingGameUI(
    waitForCompletion : Int32   # BOOL
  ) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef ProcessPendingGameUINative = Int32 Function(Int32);
typedef ProcessPendingGameUIDart = int Function(int);
final ProcessPendingGameUI = DynamicLibrary.open('api-ms-win-gaming-tcui-l1-1-0.dll')
    .lookupFunction<ProcessPendingGameUINative, ProcessPendingGameUIDart>('ProcessPendingGameUI');
// waitForCompletion : BOOL -> Int32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function ProcessPendingGameUI(
  waitForCompletion: BOOL   // BOOL
): Integer; stdcall;
  external 'api-ms-win-gaming-tcui-l1-1-0.dll' name 'ProcessPendingGameUI';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "ProcessPendingGameUI"
  c_ProcessPendingGameUI :: CInt -> IO Int32
-- waitForCompletion : BOOL -> CInt
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let processpendinggameui =
  foreign "ProcessPendingGameUI"
    (int32_t @-> returning int32_t)
(* waitForCompletion : BOOL -> int32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library api-ms-win-gaming-tcui-l1-1-0 (t "api-ms-win-gaming-tcui-l1-1-0.dll"))
(cffi:use-foreign-library api-ms-win-gaming-tcui-l1-1-0)

(cffi:defcfun ("ProcessPendingGameUI" process-pending-game-ui :convention :stdcall) :int32
  (wait-for-completion :int32))   ; BOOL
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $ProcessPendingGameUI = Win32::API::More->new('api-ms-win-gaming-tcui-l1-1-0',
    'int ProcessPendingGameUI(BOOL waitForCompletion)');
# my $ret = $ProcessPendingGameUI->Call($waitForCompletion);
# waitForCompletion : BOOL -> BOOL
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。