ホーム › System.Threading › RtwqUnlockWorkQueue
RtwqUnlockWorkQueue
関数指定したリアルタイムワークキューのロックを解除する。
シグネチャ
// RTWorkQ.dll
#include <windows.h>
HRESULT RtwqUnlockWorkQueue(
DWORD workQueueId
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| workQueueId | DWORD | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// RTWorkQ.dll
#include <windows.h>
HRESULT RtwqUnlockWorkQueue(
DWORD workQueueId
);[DllImport("RTWorkQ.dll", ExactSpelling = true)]
static extern int RtwqUnlockWorkQueue(
uint workQueueId // DWORD
);<DllImport("RTWorkQ.dll", ExactSpelling:=True)>
Public Shared Function RtwqUnlockWorkQueue(
workQueueId As UInteger ' DWORD
) As Integer
End Function' workQueueId : DWORD
Declare PtrSafe Function RtwqUnlockWorkQueue Lib "rtworkq" ( _
ByVal workQueueId As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RtwqUnlockWorkQueue = ctypes.windll.rtworkq.RtwqUnlockWorkQueue
RtwqUnlockWorkQueue.restype = ctypes.c_int
RtwqUnlockWorkQueue.argtypes = [
wintypes.DWORD, # workQueueId : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RTWorkQ.dll')
RtwqUnlockWorkQueue = Fiddle::Function.new(
lib['RtwqUnlockWorkQueue'],
[
-Fiddle::TYPE_INT, # workQueueId : DWORD
],
Fiddle::TYPE_INT)#[link(name = "rtworkq")]
extern "system" {
fn RtwqUnlockWorkQueue(
workQueueId: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RTWorkQ.dll")]
public static extern int RtwqUnlockWorkQueue(uint workQueueId);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RTWorkQ_RtwqUnlockWorkQueue' -Namespace Win32 -PassThru
# $api::RtwqUnlockWorkQueue(workQueueId)#uselib "RTWorkQ.dll"
#func global RtwqUnlockWorkQueue "RtwqUnlockWorkQueue" sptr
; RtwqUnlockWorkQueue workQueueId ; 戻り値は stat
; workQueueId : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "RTWorkQ.dll"
#cfunc global RtwqUnlockWorkQueue "RtwqUnlockWorkQueue" int
; res = RtwqUnlockWorkQueue(workQueueId)
; workQueueId : DWORD -> "int"; HRESULT RtwqUnlockWorkQueue(DWORD workQueueId)
#uselib "RTWorkQ.dll"
#cfunc global RtwqUnlockWorkQueue "RtwqUnlockWorkQueue" int
; res = RtwqUnlockWorkQueue(workQueueId)
; workQueueId : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rtworkq = windows.NewLazySystemDLL("RTWorkQ.dll")
procRtwqUnlockWorkQueue = rtworkq.NewProc("RtwqUnlockWorkQueue")
)
// workQueueId (DWORD)
r1, _, err := procRtwqUnlockWorkQueue.Call(
uintptr(workQueueId),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction RtwqUnlockWorkQueue(
workQueueId: DWORD // DWORD
): Integer; stdcall;
external 'RTWorkQ.dll' name 'RtwqUnlockWorkQueue';result := DllCall("RTWorkQ\RtwqUnlockWorkQueue"
, "UInt", workQueueId ; DWORD
, "Int") ; return: HRESULT●RtwqUnlockWorkQueue(workQueueId) = DLL("RTWorkQ.dll", "int RtwqUnlockWorkQueue(dword)")
# 呼び出し: RtwqUnlockWorkQueue(workQueueId)
# workQueueId : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。