ReleaseExclusiveCpuSets
関数確保した専有CPUセットを解放する。
シグネチャ
// api-ms-win-gaming-expandedresources-l1-1-0.dll
#include <windows.h>
HRESULT ReleaseExclusiveCpuSets(void);パラメーターなし。戻り値: HRESULT
各言語での呼び出し定義
// api-ms-win-gaming-expandedresources-l1-1-0.dll
#include <windows.h>
HRESULT ReleaseExclusiveCpuSets(void);[DllImport("api-ms-win-gaming-expandedresources-l1-1-0.dll", ExactSpelling = true)]
static extern int ReleaseExclusiveCpuSets();<DllImport("api-ms-win-gaming-expandedresources-l1-1-0.dll", ExactSpelling:=True)>
Public Shared Function ReleaseExclusiveCpuSets() As Integer
End FunctionDeclare PtrSafe Function ReleaseExclusiveCpuSets Lib "api-ms-win-gaming-expandedresources-l1-1-0" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ReleaseExclusiveCpuSets = ctypes.windll.LoadLibrary("api-ms-win-gaming-expandedresources-l1-1-0.dll").ReleaseExclusiveCpuSets
ReleaseExclusiveCpuSets.restype = ctypes.c_int
ReleaseExclusiveCpuSets.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-gaming-expandedresources-l1-1-0.dll')
ReleaseExclusiveCpuSets = Fiddle::Function.new(
lib['ReleaseExclusiveCpuSets'],
[],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-gaming-expandedresources-l1-1-0")]
extern "system" {
fn ReleaseExclusiveCpuSets() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("api-ms-win-gaming-expandedresources-l1-1-0.dll")]
public static extern int ReleaseExclusiveCpuSets();
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-gaming-expandedresources-l1-1-0_ReleaseExclusiveCpuSets' -Namespace Win32 -PassThru
# $api::ReleaseExclusiveCpuSets()#uselib "api-ms-win-gaming-expandedresources-l1-1-0.dll"
#func global ReleaseExclusiveCpuSets "ReleaseExclusiveCpuSets"
; ReleaseExclusiveCpuSets ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "api-ms-win-gaming-expandedresources-l1-1-0.dll"
#cfunc global ReleaseExclusiveCpuSets "ReleaseExclusiveCpuSets"
; res = ReleaseExclusiveCpuSets(); HRESULT ReleaseExclusiveCpuSets()
#uselib "api-ms-win-gaming-expandedresources-l1-1-0.dll"
#cfunc global ReleaseExclusiveCpuSets "ReleaseExclusiveCpuSets"
; res = ReleaseExclusiveCpuSets()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
api_ms_win_gaming_expandedresources_l1_1_0 = windows.NewLazySystemDLL("api-ms-win-gaming-expandedresources-l1-1-0.dll")
procReleaseExclusiveCpuSets = api_ms_win_gaming_expandedresources_l1_1_0.NewProc("ReleaseExclusiveCpuSets")
)
r1, _, err := procReleaseExclusiveCpuSets.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction ReleaseExclusiveCpuSets: Integer; stdcall;
external 'api-ms-win-gaming-expandedresources-l1-1-0.dll' name 'ReleaseExclusiveCpuSets';result := DllCall("api-ms-win-gaming-expandedresources-l1-1-0\ReleaseExclusiveCpuSets", "Int")●ReleaseExclusiveCpuSets() = DLL("api-ms-win-gaming-expandedresources-l1-1-0.dll", "int ReleaseExclusiveCpuSets()")
# 呼び出し: ReleaseExclusiveCpuSets()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。