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

HcsCloseOperation

関数
HCS操作を閉じてリソースを解放する。
DLLcomputecore.dll呼出規約winapi

シグネチャ

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

void HcsCloseOperation(
    HCS_OPERATION operation
);

パラメーター

名前方向
operationHCS_OPERATIONin

戻り値の型: void

各言語での呼び出し定義

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

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

HcsCloseOperation = ctypes.windll.computecore.HcsCloseOperation
HcsCloseOperation.restype = None
HcsCloseOperation.argtypes = [
    wintypes.HANDLE,  # operation : HCS_OPERATION
]
require 'fiddle'
require 'fiddle/import'

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

var (
	computecore = windows.NewLazySystemDLL("computecore.dll")
	procHcsCloseOperation = computecore.NewProc("HcsCloseOperation")
)

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