ホーム › System.HostComputeSystem › HcsGetOperationId
HcsGetOperationId
関数HCS操作の一意な識別子を取得する。
シグネチャ
// computecore.dll
#include <windows.h>
ULONGLONG HcsGetOperationId(
HCS_OPERATION operation
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| operation | HCS_OPERATION | in |
戻り値の型: ULONGLONG
各言語での呼び出し定義
// computecore.dll
#include <windows.h>
ULONGLONG HcsGetOperationId(
HCS_OPERATION operation
);[DllImport("computecore.dll", ExactSpelling = true)]
static extern ulong HcsGetOperationId(
IntPtr operation // HCS_OPERATION
);<DllImport("computecore.dll", ExactSpelling:=True)>
Public Shared Function HcsGetOperationId(
operation As IntPtr ' HCS_OPERATION
) As ULong
End Function' operation : HCS_OPERATION
Declare PtrSafe Function HcsGetOperationId Lib "computecore" ( _
ByVal operation As LongPtr) As LongLong
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
HcsGetOperationId = ctypes.windll.computecore.HcsGetOperationId
HcsGetOperationId.restype = ctypes.c_ulonglong
HcsGetOperationId.argtypes = [
wintypes.HANDLE, # operation : HCS_OPERATION
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('computecore.dll')
HcsGetOperationId = Fiddle::Function.new(
lib['HcsGetOperationId'],
[
Fiddle::TYPE_VOIDP, # operation : HCS_OPERATION
],
-Fiddle::TYPE_LONG_LONG)#[link(name = "computecore")]
extern "system" {
fn HcsGetOperationId(
operation: *mut core::ffi::c_void // HCS_OPERATION
) -> u64;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("computecore.dll")]
public static extern ulong HcsGetOperationId(IntPtr operation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'computecore_HcsGetOperationId' -Namespace Win32 -PassThru
# $api::HcsGetOperationId(operation)#uselib "computecore.dll"
#func global HcsGetOperationId "HcsGetOperationId" sptr
; HcsGetOperationId operation ; 戻り値は stat
; operation : HCS_OPERATION -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "computecore.dll"
#cfunc global HcsGetOperationId "HcsGetOperationId" sptr
; res = HcsGetOperationId(operation)
; operation : HCS_OPERATION -> "sptr"; ULONGLONG HcsGetOperationId(HCS_OPERATION operation)
#uselib "computecore.dll"
#cfunc global HcsGetOperationId "HcsGetOperationId" intptr
; res = HcsGetOperationId(operation)
; operation : HCS_OPERATION -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
computecore = windows.NewLazySystemDLL("computecore.dll")
procHcsGetOperationId = computecore.NewProc("HcsGetOperationId")
)
// operation (HCS_OPERATION)
r1, _, err := procHcsGetOperationId.Call(
uintptr(operation),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // ULONGLONGfunction HcsGetOperationId(
operation: THandle // HCS_OPERATION
): UInt64; stdcall;
external 'computecore.dll' name 'HcsGetOperationId';result := DllCall("computecore\HcsGetOperationId"
, "Ptr", operation ; HCS_OPERATION
, "Int64") ; return: ULONGLONG●HcsGetOperationId(operation) = DLL("computecore.dll", "qword HcsGetOperationId(void*)")
# 呼び出し: HcsGetOperationId(operation)
# operation : HCS_OPERATION -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。