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

RtwqStartup

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

シグネチャ

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

HRESULT RtwqStartup(void);

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

各言語での呼び出し定義

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

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

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

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

var (
	rtworkq = windows.NewLazySystemDLL("RTWorkQ.dll")
	procRtwqStartup = rtworkq.NewProc("RtwqStartup")
)

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