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

RtwqUnlockPlatform

関数
RTWQプラットフォームのロックを解除する。
DLLRTWorkQ.dll呼出規約winapi対応OSWindows 8.1 以降

シグネチャ

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

HRESULT RtwqUnlockPlatform(void);

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

各言語での呼び出し定義

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

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

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

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

var (
	rtworkq = windows.NewLazySystemDLL("RTWorkQ.dll")
	procRtwqUnlockPlatform = rtworkq.NewProc("RtwqUnlockPlatform")
)

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