ホーム › NetworkManagement.P2P › PeerGraphValidateDeferredRecords
PeerGraphValidateDeferredRecords
関数保留中のピアグラフレコードを検証する。
シグネチャ
// P2PGRAPH.dll
#include <windows.h>
HRESULT PeerGraphValidateDeferredRecords(
void* hGraph,
DWORD cRecordIds,
const GUID* pRecordIds
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hGraph | void* | in |
| cRecordIds | DWORD | in |
| pRecordIds | GUID* | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// P2PGRAPH.dll
#include <windows.h>
HRESULT PeerGraphValidateDeferredRecords(
void* hGraph,
DWORD cRecordIds,
const GUID* pRecordIds
);[DllImport("P2PGRAPH.dll", ExactSpelling = true)]
static extern int PeerGraphValidateDeferredRecords(
IntPtr hGraph, // void*
uint cRecordIds, // DWORD
ref Guid pRecordIds // GUID*
);<DllImport("P2PGRAPH.dll", ExactSpelling:=True)>
Public Shared Function PeerGraphValidateDeferredRecords(
hGraph As IntPtr, ' void*
cRecordIds As UInteger, ' DWORD
ByRef pRecordIds As Guid ' GUID*
) As Integer
End Function' hGraph : void*
' cRecordIds : DWORD
' pRecordIds : GUID*
Declare PtrSafe Function PeerGraphValidateDeferredRecords Lib "p2pgraph" ( _
ByVal hGraph As LongPtr, _
ByVal cRecordIds As Long, _
ByVal pRecordIds As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PeerGraphValidateDeferredRecords = ctypes.windll.p2pgraph.PeerGraphValidateDeferredRecords
PeerGraphValidateDeferredRecords.restype = ctypes.c_int
PeerGraphValidateDeferredRecords.argtypes = [
ctypes.POINTER(None), # hGraph : void*
wintypes.DWORD, # cRecordIds : DWORD
ctypes.c_void_p, # pRecordIds : GUID*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('P2PGRAPH.dll')
PeerGraphValidateDeferredRecords = Fiddle::Function.new(
lib['PeerGraphValidateDeferredRecords'],
[
Fiddle::TYPE_VOIDP, # hGraph : void*
-Fiddle::TYPE_INT, # cRecordIds : DWORD
Fiddle::TYPE_VOIDP, # pRecordIds : GUID*
],
Fiddle::TYPE_INT)#[link(name = "p2pgraph")]
extern "system" {
fn PeerGraphValidateDeferredRecords(
hGraph: *mut (), // void*
cRecordIds: u32, // DWORD
pRecordIds: *const GUID // GUID*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("P2PGRAPH.dll")]
public static extern int PeerGraphValidateDeferredRecords(IntPtr hGraph, uint cRecordIds, ref Guid pRecordIds);
"@
$api = Add-Type -MemberDefinition $sig -Name 'P2PGRAPH_PeerGraphValidateDeferredRecords' -Namespace Win32 -PassThru
# $api::PeerGraphValidateDeferredRecords(hGraph, cRecordIds, pRecordIds)#uselib "P2PGRAPH.dll"
#func global PeerGraphValidateDeferredRecords "PeerGraphValidateDeferredRecords" sptr, sptr, sptr
; PeerGraphValidateDeferredRecords hGraph, cRecordIds, varptr(pRecordIds) ; 戻り値は stat
; hGraph : void* -> "sptr"
; cRecordIds : DWORD -> "sptr"
; pRecordIds : GUID* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "P2PGRAPH.dll" #cfunc global PeerGraphValidateDeferredRecords "PeerGraphValidateDeferredRecords" sptr, int, var ; res = PeerGraphValidateDeferredRecords(hGraph, cRecordIds, pRecordIds) ; hGraph : void* -> "sptr" ; cRecordIds : DWORD -> "int" ; pRecordIds : GUID* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "P2PGRAPH.dll" #cfunc global PeerGraphValidateDeferredRecords "PeerGraphValidateDeferredRecords" sptr, int, sptr ; res = PeerGraphValidateDeferredRecords(hGraph, cRecordIds, varptr(pRecordIds)) ; hGraph : void* -> "sptr" ; cRecordIds : DWORD -> "int" ; pRecordIds : GUID* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT PeerGraphValidateDeferredRecords(void* hGraph, DWORD cRecordIds, GUID* pRecordIds) #uselib "P2PGRAPH.dll" #cfunc global PeerGraphValidateDeferredRecords "PeerGraphValidateDeferredRecords" intptr, int, var ; res = PeerGraphValidateDeferredRecords(hGraph, cRecordIds, pRecordIds) ; hGraph : void* -> "intptr" ; cRecordIds : DWORD -> "int" ; pRecordIds : GUID* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT PeerGraphValidateDeferredRecords(void* hGraph, DWORD cRecordIds, GUID* pRecordIds) #uselib "P2PGRAPH.dll" #cfunc global PeerGraphValidateDeferredRecords "PeerGraphValidateDeferredRecords" intptr, int, intptr ; res = PeerGraphValidateDeferredRecords(hGraph, cRecordIds, varptr(pRecordIds)) ; hGraph : void* -> "intptr" ; cRecordIds : DWORD -> "int" ; pRecordIds : GUID* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
p2pgraph = windows.NewLazySystemDLL("P2PGRAPH.dll")
procPeerGraphValidateDeferredRecords = p2pgraph.NewProc("PeerGraphValidateDeferredRecords")
)
// hGraph (void*), cRecordIds (DWORD), pRecordIds (GUID*)
r1, _, err := procPeerGraphValidateDeferredRecords.Call(
uintptr(hGraph),
uintptr(cRecordIds),
uintptr(pRecordIds),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction PeerGraphValidateDeferredRecords(
hGraph: Pointer; // void*
cRecordIds: DWORD; // DWORD
pRecordIds: PGUID // GUID*
): Integer; stdcall;
external 'P2PGRAPH.dll' name 'PeerGraphValidateDeferredRecords';result := DllCall("P2PGRAPH\PeerGraphValidateDeferredRecords"
, "Ptr", hGraph ; void*
, "UInt", cRecordIds ; DWORD
, "Ptr", pRecordIds ; GUID*
, "Int") ; return: HRESULT●PeerGraphValidateDeferredRecords(hGraph, cRecordIds, pRecordIds) = DLL("P2PGRAPH.dll", "int PeerGraphValidateDeferredRecords(void*, dword, void*)")
# 呼び出し: PeerGraphValidateDeferredRecords(hGraph, cRecordIds, pRecordIds)
# hGraph : void* -> "void*"
# cRecordIds : DWORD -> "dword"
# pRecordIds : GUID* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。