ホーム › System.CorrelationVector › RtlExtendCorrelationVector
RtlExtendCorrelationVector
関数相関ベクターに新しい階層レベルを追加して拡張する。
シグネチャ
// ntdll.dll
#include <windows.h>
DWORD RtlExtendCorrelationVector(
CORRELATION_VECTOR* CorrelationVector
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| CorrelationVector | CORRELATION_VECTOR* | inout | 新たな階層要素を追加して拡張する相関ベクトル構造体へのポインタ。 |
戻り値の型: DWORD
各言語での呼び出し定義
// ntdll.dll
#include <windows.h>
DWORD RtlExtendCorrelationVector(
CORRELATION_VECTOR* CorrelationVector
);[DllImport("ntdll.dll", ExactSpelling = true)]
static extern uint RtlExtendCorrelationVector(
IntPtr CorrelationVector // CORRELATION_VECTOR* in/out
);<DllImport("ntdll.dll", ExactSpelling:=True)>
Public Shared Function RtlExtendCorrelationVector(
CorrelationVector As IntPtr ' CORRELATION_VECTOR* in/out
) As UInteger
End Function' CorrelationVector : CORRELATION_VECTOR* in/out
Declare PtrSafe Function RtlExtendCorrelationVector Lib "ntdll" ( _
ByVal CorrelationVector As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RtlExtendCorrelationVector = ctypes.windll.ntdll.RtlExtendCorrelationVector
RtlExtendCorrelationVector.restype = wintypes.DWORD
RtlExtendCorrelationVector.argtypes = [
ctypes.c_void_p, # CorrelationVector : CORRELATION_VECTOR* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ntdll.dll')
RtlExtendCorrelationVector = Fiddle::Function.new(
lib['RtlExtendCorrelationVector'],
[
Fiddle::TYPE_VOIDP, # CorrelationVector : CORRELATION_VECTOR* in/out
],
-Fiddle::TYPE_INT)#[link(name = "ntdll")]
extern "system" {
fn RtlExtendCorrelationVector(
CorrelationVector: *mut CORRELATION_VECTOR // CORRELATION_VECTOR* in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ntdll.dll")]
public static extern uint RtlExtendCorrelationVector(IntPtr CorrelationVector);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ntdll_RtlExtendCorrelationVector' -Namespace Win32 -PassThru
# $api::RtlExtendCorrelationVector(CorrelationVector)#uselib "ntdll.dll"
#func global RtlExtendCorrelationVector "RtlExtendCorrelationVector" sptr
; RtlExtendCorrelationVector varptr(CorrelationVector) ; 戻り値は stat
; CorrelationVector : CORRELATION_VECTOR* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "ntdll.dll" #cfunc global RtlExtendCorrelationVector "RtlExtendCorrelationVector" var ; res = RtlExtendCorrelationVector(CorrelationVector) ; CorrelationVector : CORRELATION_VECTOR* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "ntdll.dll" #cfunc global RtlExtendCorrelationVector "RtlExtendCorrelationVector" sptr ; res = RtlExtendCorrelationVector(varptr(CorrelationVector)) ; CorrelationVector : CORRELATION_VECTOR* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD RtlExtendCorrelationVector(CORRELATION_VECTOR* CorrelationVector) #uselib "ntdll.dll" #cfunc global RtlExtendCorrelationVector "RtlExtendCorrelationVector" var ; res = RtlExtendCorrelationVector(CorrelationVector) ; CorrelationVector : CORRELATION_VECTOR* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD RtlExtendCorrelationVector(CORRELATION_VECTOR* CorrelationVector) #uselib "ntdll.dll" #cfunc global RtlExtendCorrelationVector "RtlExtendCorrelationVector" intptr ; res = RtlExtendCorrelationVector(varptr(CorrelationVector)) ; CorrelationVector : CORRELATION_VECTOR* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ntdll = windows.NewLazySystemDLL("ntdll.dll")
procRtlExtendCorrelationVector = ntdll.NewProc("RtlExtendCorrelationVector")
)
// CorrelationVector (CORRELATION_VECTOR* in/out)
r1, _, err := procRtlExtendCorrelationVector.Call(
uintptr(CorrelationVector),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction RtlExtendCorrelationVector(
CorrelationVector: Pointer // CORRELATION_VECTOR* in/out
): DWORD; stdcall;
external 'ntdll.dll' name 'RtlExtendCorrelationVector';result := DllCall("ntdll\RtlExtendCorrelationVector"
, "Ptr", CorrelationVector ; CORRELATION_VECTOR* in/out
, "UInt") ; return: DWORD●RtlExtendCorrelationVector(CorrelationVector) = DLL("ntdll.dll", "dword RtlExtendCorrelationVector(void*)")
# 呼び出し: RtlExtendCorrelationVector(CorrelationVector)
# CorrelationVector : CORRELATION_VECTOR* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "ntdll" fn RtlExtendCorrelationVector(
CorrelationVector: [*c]CORRELATION_VECTOR // CORRELATION_VECTOR* in/out
) callconv(std.os.windows.WINAPI) u32;proc RtlExtendCorrelationVector(
CorrelationVector: ptr CORRELATION_VECTOR # CORRELATION_VECTOR* in/out
): uint32 {.importc: "RtlExtendCorrelationVector", stdcall, dynlib: "ntdll.dll".}pragma(lib, "ntdll");
extern(Windows)
uint RtlExtendCorrelationVector(
CORRELATION_VECTOR* CorrelationVector // CORRELATION_VECTOR* in/out
);ccall((:RtlExtendCorrelationVector, "ntdll.dll"), stdcall, UInt32,
(Ptr{CORRELATION_VECTOR},),
CorrelationVector)
# CorrelationVector : CORRELATION_VECTOR* in/out -> Ptr{CORRELATION_VECTOR}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
uint32_t RtlExtendCorrelationVector(
void* CorrelationVector);
]]
local ntdll = ffi.load("ntdll")
-- ntdll.RtlExtendCorrelationVector(CorrelationVector)
-- CorrelationVector : CORRELATION_VECTOR* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('ntdll.dll');
const RtlExtendCorrelationVector = lib.func('__stdcall', 'RtlExtendCorrelationVector', 'uint32_t', ['void *']);
// RtlExtendCorrelationVector(CorrelationVector)
// CorrelationVector : CORRELATION_VECTOR* in/out -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("ntdll.dll", {
RtlExtendCorrelationVector: { parameters: ["pointer"], result: "u32" },
});
// lib.symbols.RtlExtendCorrelationVector(CorrelationVector)
// CorrelationVector : CORRELATION_VECTOR* in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t RtlExtendCorrelationVector(
void* CorrelationVector);
C, "ntdll.dll");
// $ffi->RtlExtendCorrelationVector(CorrelationVector);
// CorrelationVector : CORRELATION_VECTOR* in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Ntdll extends StdCallLibrary {
Ntdll INSTANCE = Native.load("ntdll", Ntdll.class);
int RtlExtendCorrelationVector(
Pointer CorrelationVector // CORRELATION_VECTOR* in/out
);
}@[Link("ntdll")]
lib Libntdll
fun RtlExtendCorrelationVector = RtlExtendCorrelationVector(
CorrelationVector : CORRELATION_VECTOR* # CORRELATION_VECTOR* in/out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef RtlExtendCorrelationVectorNative = Uint32 Function(Pointer<Void>);
typedef RtlExtendCorrelationVectorDart = int Function(Pointer<Void>);
final RtlExtendCorrelationVector = DynamicLibrary.open('ntdll.dll')
.lookupFunction<RtlExtendCorrelationVectorNative, RtlExtendCorrelationVectorDart>('RtlExtendCorrelationVector');
// CorrelationVector : CORRELATION_VECTOR* in/out -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function RtlExtendCorrelationVector(
CorrelationVector: Pointer // CORRELATION_VECTOR* in/out
): DWORD; stdcall;
external 'ntdll.dll' name 'RtlExtendCorrelationVector';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "RtlExtendCorrelationVector"
c_RtlExtendCorrelationVector :: Ptr () -> IO Word32
-- CorrelationVector : CORRELATION_VECTOR* in/out -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let rtlextendcorrelationvector =
foreign "RtlExtendCorrelationVector"
((ptr void) @-> returning uint32_t)
(* CorrelationVector : CORRELATION_VECTOR* in/out -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library ntdll (t "ntdll.dll"))
(cffi:use-foreign-library ntdll)
(cffi:defcfun ("RtlExtendCorrelationVector" rtl-extend-correlation-vector :convention :stdcall) :uint32
(correlation-vector :pointer)) ; CORRELATION_VECTOR* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $RtlExtendCorrelationVector = Win32::API::More->new('ntdll',
'DWORD RtlExtendCorrelationVector(LPVOID CorrelationVector)');
# my $ret = $RtlExtendCorrelationVector->Call($CorrelationVector);
# CorrelationVector : CORRELATION_VECTOR* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
使用する型