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

RtlValidateCorrelationVector

関数
相関ベクターの形式が有効かどうかを検証する。
DLLntdll.dll呼出規約winapi

シグネチャ

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

DWORD RtlValidateCorrelationVector(
    CORRELATION_VECTOR* Vector
);

パラメーター

名前方向
VectorCORRELATION_VECTOR*in

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD RtlValidateCorrelationVector(
    CORRELATION_VECTOR* Vector
);
[DllImport("ntdll.dll", ExactSpelling = true)]
static extern uint RtlValidateCorrelationVector(
    IntPtr Vector   // CORRELATION_VECTOR*
);
<DllImport("ntdll.dll", ExactSpelling:=True)>
Public Shared Function RtlValidateCorrelationVector(
    Vector As IntPtr   ' CORRELATION_VECTOR*
) As UInteger
End Function
' Vector : CORRELATION_VECTOR*
Declare PtrSafe Function RtlValidateCorrelationVector Lib "ntdll" ( _
    ByVal Vector As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RtlValidateCorrelationVector = ctypes.windll.ntdll.RtlValidateCorrelationVector
RtlValidateCorrelationVector.restype = wintypes.DWORD
RtlValidateCorrelationVector.argtypes = [
    ctypes.c_void_p,  # Vector : CORRELATION_VECTOR*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ntdll.dll')
RtlValidateCorrelationVector = Fiddle::Function.new(
  lib['RtlValidateCorrelationVector'],
  [
    Fiddle::TYPE_VOIDP,  # Vector : CORRELATION_VECTOR*
  ],
  -Fiddle::TYPE_INT)
#[link(name = "ntdll")]
extern "system" {
    fn RtlValidateCorrelationVector(
        Vector: *mut CORRELATION_VECTOR  // CORRELATION_VECTOR*
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("ntdll.dll")]
public static extern uint RtlValidateCorrelationVector(IntPtr Vector);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ntdll_RtlValidateCorrelationVector' -Namespace Win32 -PassThru
# $api::RtlValidateCorrelationVector(Vector)
#uselib "ntdll.dll"
#func global RtlValidateCorrelationVector "RtlValidateCorrelationVector" sptr
; RtlValidateCorrelationVector varptr(Vector)   ; 戻り値は stat
; Vector : CORRELATION_VECTOR* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "ntdll.dll"
#cfunc global RtlValidateCorrelationVector "RtlValidateCorrelationVector" var
; res = RtlValidateCorrelationVector(Vector)
; Vector : CORRELATION_VECTOR* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD RtlValidateCorrelationVector(CORRELATION_VECTOR* Vector)
#uselib "ntdll.dll"
#cfunc global RtlValidateCorrelationVector "RtlValidateCorrelationVector" var
; res = RtlValidateCorrelationVector(Vector)
; Vector : CORRELATION_VECTOR* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	ntdll = windows.NewLazySystemDLL("ntdll.dll")
	procRtlValidateCorrelationVector = ntdll.NewProc("RtlValidateCorrelationVector")
)

// Vector (CORRELATION_VECTOR*)
r1, _, err := procRtlValidateCorrelationVector.Call(
	uintptr(Vector),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function RtlValidateCorrelationVector(
  Vector: Pointer   // CORRELATION_VECTOR*
): DWORD; stdcall;
  external 'ntdll.dll' name 'RtlValidateCorrelationVector';
result := DllCall("ntdll\RtlValidateCorrelationVector"
    , "Ptr", Vector   ; CORRELATION_VECTOR*
    , "UInt")   ; return: DWORD
●RtlValidateCorrelationVector(Vector) = DLL("ntdll.dll", "dword RtlValidateCorrelationVector(void*)")
# 呼び出し: RtlValidateCorrelationVector(Vector)
# Vector : CORRELATION_VECTOR* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。