Win32 API 日本語リファレンス
ホームSystem.Threading › CreateUmsCompletionList

CreateUmsCompletionList

関数
UMSスケジューラ用の完了リストを作成する。
DLLKERNEL32.dll呼出規約winapiSetLastErrorあり対応OSWindows 7 以降

シグネチャ

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

BOOL CreateUmsCompletionList(
    void** UmsCompletionList
);

パラメーター

名前方向
UmsCompletionListvoid**out

戻り値の型: BOOL

各言語での呼び出し定義

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

BOOL CreateUmsCompletionList(
    void** UmsCompletionList
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool CreateUmsCompletionList(
    IntPtr UmsCompletionList   // void** out
);
<DllImport("KERNEL32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function CreateUmsCompletionList(
    UmsCompletionList As IntPtr   ' void** out
) As Boolean
End Function
' UmsCompletionList : void** out
Declare PtrSafe Function CreateUmsCompletionList Lib "kernel32" ( _
    ByVal UmsCompletionList As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

CreateUmsCompletionList = ctypes.windll.kernel32.CreateUmsCompletionList
CreateUmsCompletionList.restype = wintypes.BOOL
CreateUmsCompletionList.argtypes = [
    ctypes.c_void_p,  # UmsCompletionList : void** out
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('KERNEL32.dll')
CreateUmsCompletionList = Fiddle::Function.new(
  lib['CreateUmsCompletionList'],
  [
    Fiddle::TYPE_VOIDP,  # UmsCompletionList : void** out
  ],
  Fiddle::TYPE_INT)
#[link(name = "kernel32")]
extern "system" {
    fn CreateUmsCompletionList(
        UmsCompletionList: *mut *mut ()  // void** out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", SetLastError = true)]
public static extern bool CreateUmsCompletionList(IntPtr UmsCompletionList);
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_CreateUmsCompletionList' -Namespace Win32 -PassThru
# $api::CreateUmsCompletionList(UmsCompletionList)
#uselib "KERNEL32.dll"
#func global CreateUmsCompletionList "CreateUmsCompletionList" sptr
; CreateUmsCompletionList UmsCompletionList   ; 戻り値は stat
; UmsCompletionList : void** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "KERNEL32.dll"
#cfunc global CreateUmsCompletionList "CreateUmsCompletionList" sptr
; res = CreateUmsCompletionList(UmsCompletionList)
; UmsCompletionList : void** out -> "sptr"
; BOOL CreateUmsCompletionList(void** UmsCompletionList)
#uselib "KERNEL32.dll"
#cfunc global CreateUmsCompletionList "CreateUmsCompletionList" intptr
; res = CreateUmsCompletionList(UmsCompletionList)
; UmsCompletionList : void** out -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
	procCreateUmsCompletionList = kernel32.NewProc("CreateUmsCompletionList")
)

// UmsCompletionList (void** out)
r1, _, err := procCreateUmsCompletionList.Call(
	uintptr(UmsCompletionList),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function CreateUmsCompletionList(
  UmsCompletionList: Pointer   // void** out
): BOOL; stdcall;
  external 'KERNEL32.dll' name 'CreateUmsCompletionList';
result := DllCall("KERNEL32\CreateUmsCompletionList"
    , "Ptr", UmsCompletionList   ; void** out
    , "Int")   ; return: BOOL
●CreateUmsCompletionList(UmsCompletionList) = DLL("KERNEL32.dll", "bool CreateUmsCompletionList(void*)")
# 呼び出し: CreateUmsCompletionList(UmsCompletionList)
# UmsCompletionList : void** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。