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

RtwqShutdown

関数
リアルタイムワークキュープラットフォームを終了する。
DLLRTWorkQ.dll呼出規約winapi対応OSWindows 8.1 以降

シグネチャ

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

HRESULT RtwqShutdown(void);

パラメーターなし。戻り値: HRESULT

各言語での呼び出し定義

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

HRESULT RtwqShutdown(void);
[DllImport("RTWorkQ.dll", ExactSpelling = true)]
static extern int RtwqShutdown();
<DllImport("RTWorkQ.dll", ExactSpelling:=True)>
Public Shared Function RtwqShutdown() As Integer
End Function
Declare PtrSafe Function RtwqShutdown Lib "rtworkq" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RtwqShutdown = ctypes.windll.rtworkq.RtwqShutdown
RtwqShutdown.restype = ctypes.c_int
RtwqShutdown.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	rtworkq = windows.NewLazySystemDLL("RTWorkQ.dll")
	procRtwqShutdown = rtworkq.NewProc("RtwqShutdown")
)

r1, _, err := procRtwqShutdown.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function RtwqShutdown: Integer; stdcall;
  external 'RTWorkQ.dll' name 'RtwqShutdown';
result := DllCall("RTWorkQ\RtwqShutdown", "Int")
●RtwqShutdown() = DLL("RTWorkQ.dll", "int RtwqShutdown()")
# 呼び出し: RtwqShutdown()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。