ホーム › Networking.Clustering › ClusterRegReadBatchReplyNextCommand
ClusterRegReadBatchReplyNextCommand
関数読み取りバッチ応答から次のコマンド結果を取得する。
シグネチャ
// CLUSAPI.dll
#include <windows.h>
INT ClusterRegReadBatchReplyNextCommand(
HREGREADBATCHREPLY hRegReadBatchReply,
CLUSTER_READ_BATCH_COMMAND* pBatchCommand
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hRegReadBatchReply | HREGREADBATCHREPLY | in |
| pBatchCommand | CLUSTER_READ_BATCH_COMMAND* | out |
戻り値の型: INT
各言語での呼び出し定義
// CLUSAPI.dll
#include <windows.h>
INT ClusterRegReadBatchReplyNextCommand(
HREGREADBATCHREPLY hRegReadBatchReply,
CLUSTER_READ_BATCH_COMMAND* pBatchCommand
);[DllImport("CLUSAPI.dll", ExactSpelling = true)]
static extern int ClusterRegReadBatchReplyNextCommand(
IntPtr hRegReadBatchReply, // HREGREADBATCHREPLY
IntPtr pBatchCommand // CLUSTER_READ_BATCH_COMMAND* out
);<DllImport("CLUSAPI.dll", ExactSpelling:=True)>
Public Shared Function ClusterRegReadBatchReplyNextCommand(
hRegReadBatchReply As IntPtr, ' HREGREADBATCHREPLY
pBatchCommand As IntPtr ' CLUSTER_READ_BATCH_COMMAND* out
) As Integer
End Function' hRegReadBatchReply : HREGREADBATCHREPLY
' pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out
Declare PtrSafe Function ClusterRegReadBatchReplyNextCommand Lib "clusapi" ( _
ByVal hRegReadBatchReply As LongPtr, _
ByVal pBatchCommand As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ClusterRegReadBatchReplyNextCommand = ctypes.windll.clusapi.ClusterRegReadBatchReplyNextCommand
ClusterRegReadBatchReplyNextCommand.restype = ctypes.c_int
ClusterRegReadBatchReplyNextCommand.argtypes = [
ctypes.c_ssize_t, # hRegReadBatchReply : HREGREADBATCHREPLY
ctypes.c_void_p, # pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('CLUSAPI.dll')
ClusterRegReadBatchReplyNextCommand = Fiddle::Function.new(
lib['ClusterRegReadBatchReplyNextCommand'],
[
Fiddle::TYPE_INTPTR_T, # hRegReadBatchReply : HREGREADBATCHREPLY
Fiddle::TYPE_VOIDP, # pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out
],
Fiddle::TYPE_INT)#[link(name = "clusapi")]
extern "system" {
fn ClusterRegReadBatchReplyNextCommand(
hRegReadBatchReply: isize, // HREGREADBATCHREPLY
pBatchCommand: *mut CLUSTER_READ_BATCH_COMMAND // CLUSTER_READ_BATCH_COMMAND* out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("CLUSAPI.dll")]
public static extern int ClusterRegReadBatchReplyNextCommand(IntPtr hRegReadBatchReply, IntPtr pBatchCommand);
"@
$api = Add-Type -MemberDefinition $sig -Name 'CLUSAPI_ClusterRegReadBatchReplyNextCommand' -Namespace Win32 -PassThru
# $api::ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, pBatchCommand)#uselib "CLUSAPI.dll"
#func global ClusterRegReadBatchReplyNextCommand "ClusterRegReadBatchReplyNextCommand" sptr, sptr
; ClusterRegReadBatchReplyNextCommand hRegReadBatchReply, varptr(pBatchCommand) ; 戻り値は stat
; hRegReadBatchReply : HREGREADBATCHREPLY -> "sptr"
; pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "CLUSAPI.dll" #cfunc global ClusterRegReadBatchReplyNextCommand "ClusterRegReadBatchReplyNextCommand" sptr, var ; res = ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, pBatchCommand) ; hRegReadBatchReply : HREGREADBATCHREPLY -> "sptr" ; pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "CLUSAPI.dll" #cfunc global ClusterRegReadBatchReplyNextCommand "ClusterRegReadBatchReplyNextCommand" sptr, sptr ; res = ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, varptr(pBatchCommand)) ; hRegReadBatchReply : HREGREADBATCHREPLY -> "sptr" ; pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; INT ClusterRegReadBatchReplyNextCommand(HREGREADBATCHREPLY hRegReadBatchReply, CLUSTER_READ_BATCH_COMMAND* pBatchCommand) #uselib "CLUSAPI.dll" #cfunc global ClusterRegReadBatchReplyNextCommand "ClusterRegReadBatchReplyNextCommand" intptr, var ; res = ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, pBatchCommand) ; hRegReadBatchReply : HREGREADBATCHREPLY -> "intptr" ; pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; INT ClusterRegReadBatchReplyNextCommand(HREGREADBATCHREPLY hRegReadBatchReply, CLUSTER_READ_BATCH_COMMAND* pBatchCommand) #uselib "CLUSAPI.dll" #cfunc global ClusterRegReadBatchReplyNextCommand "ClusterRegReadBatchReplyNextCommand" intptr, intptr ; res = ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, varptr(pBatchCommand)) ; hRegReadBatchReply : HREGREADBATCHREPLY -> "intptr" ; pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
clusapi = windows.NewLazySystemDLL("CLUSAPI.dll")
procClusterRegReadBatchReplyNextCommand = clusapi.NewProc("ClusterRegReadBatchReplyNextCommand")
)
// hRegReadBatchReply (HREGREADBATCHREPLY), pBatchCommand (CLUSTER_READ_BATCH_COMMAND* out)
r1, _, err := procClusterRegReadBatchReplyNextCommand.Call(
uintptr(hRegReadBatchReply),
uintptr(pBatchCommand),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction ClusterRegReadBatchReplyNextCommand(
hRegReadBatchReply: NativeInt; // HREGREADBATCHREPLY
pBatchCommand: Pointer // CLUSTER_READ_BATCH_COMMAND* out
): Integer; stdcall;
external 'CLUSAPI.dll' name 'ClusterRegReadBatchReplyNextCommand';result := DllCall("CLUSAPI\ClusterRegReadBatchReplyNextCommand"
, "Ptr", hRegReadBatchReply ; HREGREADBATCHREPLY
, "Ptr", pBatchCommand ; CLUSTER_READ_BATCH_COMMAND* out
, "Int") ; return: INT●ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, pBatchCommand) = DLL("CLUSAPI.dll", "int ClusterRegReadBatchReplyNextCommand(int, void*)")
# 呼び出し: ClusterRegReadBatchReplyNextCommand(hRegReadBatchReply, pBatchCommand)
# hRegReadBatchReply : HREGREADBATCHREPLY -> "int"
# pBatchCommand : CLUSTER_READ_BATCH_COMMAND* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。