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

HcsCloseComputeSystem

関数
コンピュートシステムのハンドルを閉じる。
DLLcomputecore.dll呼出規約winapi

シグネチャ

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

void HcsCloseComputeSystem(
    HCS_SYSTEM computeSystem
);

パラメーター

名前方向
computeSystemHCS_SYSTEMin

戻り値の型: void

各言語での呼び出し定義

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

void HcsCloseComputeSystem(
    HCS_SYSTEM computeSystem
);
[DllImport("computecore.dll", ExactSpelling = true)]
static extern void HcsCloseComputeSystem(
    IntPtr computeSystem   // HCS_SYSTEM
);
<DllImport("computecore.dll", ExactSpelling:=True)>
Public Shared Sub HcsCloseComputeSystem(
    computeSystem As IntPtr   ' HCS_SYSTEM
)
End Sub
' computeSystem : HCS_SYSTEM
Declare PtrSafe Sub HcsCloseComputeSystem Lib "computecore" ( _
    ByVal computeSystem As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

HcsCloseComputeSystem = ctypes.windll.computecore.HcsCloseComputeSystem
HcsCloseComputeSystem.restype = None
HcsCloseComputeSystem.argtypes = [
    wintypes.HANDLE,  # computeSystem : HCS_SYSTEM
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('computecore.dll')
HcsCloseComputeSystem = Fiddle::Function.new(
  lib['HcsCloseComputeSystem'],
  [
    Fiddle::TYPE_VOIDP,  # computeSystem : HCS_SYSTEM
  ],
  Fiddle::TYPE_VOID)
#[link(name = "computecore")]
extern "system" {
    fn HcsCloseComputeSystem(
        computeSystem: *mut core::ffi::c_void  // HCS_SYSTEM
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("computecore.dll")]
public static extern void HcsCloseComputeSystem(IntPtr computeSystem);
"@
$api = Add-Type -MemberDefinition $sig -Name 'computecore_HcsCloseComputeSystem' -Namespace Win32 -PassThru
# $api::HcsCloseComputeSystem(computeSystem)
#uselib "computecore.dll"
#func global HcsCloseComputeSystem "HcsCloseComputeSystem" sptr
; HcsCloseComputeSystem computeSystem
; computeSystem : HCS_SYSTEM -> "sptr"
#uselib "computecore.dll"
#func global HcsCloseComputeSystem "HcsCloseComputeSystem" sptr
; HcsCloseComputeSystem computeSystem
; computeSystem : HCS_SYSTEM -> "sptr"
; void HcsCloseComputeSystem(HCS_SYSTEM computeSystem)
#uselib "computecore.dll"
#func global HcsCloseComputeSystem "HcsCloseComputeSystem" intptr
; HcsCloseComputeSystem computeSystem
; computeSystem : HCS_SYSTEM -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	computecore = windows.NewLazySystemDLL("computecore.dll")
	procHcsCloseComputeSystem = computecore.NewProc("HcsCloseComputeSystem")
)

// computeSystem (HCS_SYSTEM)
r1, _, err := procHcsCloseComputeSystem.Call(
	uintptr(computeSystem),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure HcsCloseComputeSystem(
  computeSystem: THandle   // HCS_SYSTEM
); stdcall;
  external 'computecore.dll' name 'HcsCloseComputeSystem';
result := DllCall("computecore\HcsCloseComputeSystem"
    , "Ptr", computeSystem   ; HCS_SYSTEM
    , "Int")   ; return: void
●HcsCloseComputeSystem(computeSystem) = DLL("computecore.dll", "int HcsCloseComputeSystem(void*)")
# 呼び出し: HcsCloseComputeSystem(computeSystem)
# computeSystem : HCS_SYSTEM -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。