ホーム › Networking.Clustering › EvictClusterNodeEx
EvictClusterNodeEx
関数クラスターからノードを排除しクリーンアップ状態を返す。
シグネチャ
// CLUSAPI.dll
#include <windows.h>
DWORD EvictClusterNodeEx(
HNODE hNode,
DWORD dwTimeOut,
HRESULT* phrCleanupStatus
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hNode | HNODE | in |
| dwTimeOut | DWORD | in |
| phrCleanupStatus | HRESULT* | out |
戻り値の型: DWORD
各言語での呼び出し定義
// CLUSAPI.dll
#include <windows.h>
DWORD EvictClusterNodeEx(
HNODE hNode,
DWORD dwTimeOut,
HRESULT* phrCleanupStatus
);[DllImport("CLUSAPI.dll", ExactSpelling = true)]
static extern uint EvictClusterNodeEx(
IntPtr hNode, // HNODE
uint dwTimeOut, // DWORD
out int phrCleanupStatus // HRESULT* out
);<DllImport("CLUSAPI.dll", ExactSpelling:=True)>
Public Shared Function EvictClusterNodeEx(
hNode As IntPtr, ' HNODE
dwTimeOut As UInteger, ' DWORD
<Out> ByRef phrCleanupStatus As Integer ' HRESULT* out
) As UInteger
End Function' hNode : HNODE
' dwTimeOut : DWORD
' phrCleanupStatus : HRESULT* out
Declare PtrSafe Function EvictClusterNodeEx Lib "clusapi" ( _
ByVal hNode As LongPtr, _
ByVal dwTimeOut As Long, _
ByRef phrCleanupStatus As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EvictClusterNodeEx = ctypes.windll.clusapi.EvictClusterNodeEx
EvictClusterNodeEx.restype = wintypes.DWORD
EvictClusterNodeEx.argtypes = [
ctypes.c_ssize_t, # hNode : HNODE
wintypes.DWORD, # dwTimeOut : DWORD
ctypes.c_void_p, # phrCleanupStatus : HRESULT* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('CLUSAPI.dll')
EvictClusterNodeEx = Fiddle::Function.new(
lib['EvictClusterNodeEx'],
[
Fiddle::TYPE_INTPTR_T, # hNode : HNODE
-Fiddle::TYPE_INT, # dwTimeOut : DWORD
Fiddle::TYPE_VOIDP, # phrCleanupStatus : HRESULT* out
],
-Fiddle::TYPE_INT)#[link(name = "clusapi")]
extern "system" {
fn EvictClusterNodeEx(
hNode: isize, // HNODE
dwTimeOut: u32, // DWORD
phrCleanupStatus: *mut i32 // HRESULT* out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("CLUSAPI.dll")]
public static extern uint EvictClusterNodeEx(IntPtr hNode, uint dwTimeOut, out int phrCleanupStatus);
"@
$api = Add-Type -MemberDefinition $sig -Name 'CLUSAPI_EvictClusterNodeEx' -Namespace Win32 -PassThru
# $api::EvictClusterNodeEx(hNode, dwTimeOut, phrCleanupStatus)#uselib "CLUSAPI.dll"
#func global EvictClusterNodeEx "EvictClusterNodeEx" sptr, sptr, sptr
; EvictClusterNodeEx hNode, dwTimeOut, phrCleanupStatus ; 戻り値は stat
; hNode : HNODE -> "sptr"
; dwTimeOut : DWORD -> "sptr"
; phrCleanupStatus : HRESULT* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "CLUSAPI.dll"
#cfunc global EvictClusterNodeEx "EvictClusterNodeEx" sptr, int, int
; res = EvictClusterNodeEx(hNode, dwTimeOut, phrCleanupStatus)
; hNode : HNODE -> "sptr"
; dwTimeOut : DWORD -> "int"
; phrCleanupStatus : HRESULT* out -> "int"; DWORD EvictClusterNodeEx(HNODE hNode, DWORD dwTimeOut, HRESULT* phrCleanupStatus)
#uselib "CLUSAPI.dll"
#cfunc global EvictClusterNodeEx "EvictClusterNodeEx" intptr, int, int
; res = EvictClusterNodeEx(hNode, dwTimeOut, phrCleanupStatus)
; hNode : HNODE -> "intptr"
; dwTimeOut : DWORD -> "int"
; phrCleanupStatus : HRESULT* out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
clusapi = windows.NewLazySystemDLL("CLUSAPI.dll")
procEvictClusterNodeEx = clusapi.NewProc("EvictClusterNodeEx")
)
// hNode (HNODE), dwTimeOut (DWORD), phrCleanupStatus (HRESULT* out)
r1, _, err := procEvictClusterNodeEx.Call(
uintptr(hNode),
uintptr(dwTimeOut),
uintptr(phrCleanupStatus),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction EvictClusterNodeEx(
hNode: NativeInt; // HNODE
dwTimeOut: DWORD; // DWORD
phrCleanupStatus: Pointer // HRESULT* out
): DWORD; stdcall;
external 'CLUSAPI.dll' name 'EvictClusterNodeEx';result := DllCall("CLUSAPI\EvictClusterNodeEx"
, "Ptr", hNode ; HNODE
, "UInt", dwTimeOut ; DWORD
, "Ptr", phrCleanupStatus ; HRESULT* out
, "UInt") ; return: DWORD●EvictClusterNodeEx(hNode, dwTimeOut, phrCleanupStatus) = DLL("CLUSAPI.dll", "dword EvictClusterNodeEx(int, dword, void*)")
# 呼び出し: EvictClusterNodeEx(hNode, dwTimeOut, phrCleanupStatus)
# hNode : HNODE -> "int"
# dwTimeOut : DWORD -> "dword"
# phrCleanupStatus : HRESULT* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。