Win32 API 日本語リファレンス
ホームDevices.Sensors › CollectionsListUpdateMarshalledPointer

CollectionsListUpdateMarshalledPointer

関数
マーシャリング済みコレクションリスト内のポインターを更新する。
DLLSensorsUtilsV2.dll呼出規約winapi

シグネチャ

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

NTSTATUS CollectionsListUpdateMarshalledPointer(
    SENSOR_COLLECTION_LIST* Collection
);

パラメーター

名前方向
CollectionSENSOR_COLLECTION_LIST*inout

戻り値の型: NTSTATUS

各言語での呼び出し定義

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

NTSTATUS CollectionsListUpdateMarshalledPointer(
    SENSOR_COLLECTION_LIST* Collection
);
[DllImport("SensorsUtilsV2.dll", ExactSpelling = true)]
static extern int CollectionsListUpdateMarshalledPointer(
    IntPtr Collection   // SENSOR_COLLECTION_LIST* in/out
);
<DllImport("SensorsUtilsV2.dll", ExactSpelling:=True)>
Public Shared Function CollectionsListUpdateMarshalledPointer(
    Collection As IntPtr   ' SENSOR_COLLECTION_LIST* in/out
) As Integer
End Function
' Collection : SENSOR_COLLECTION_LIST* in/out
Declare PtrSafe Function CollectionsListUpdateMarshalledPointer Lib "sensorsutilsv2" ( _
    ByVal Collection As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

CollectionsListUpdateMarshalledPointer = ctypes.windll.sensorsutilsv2.CollectionsListUpdateMarshalledPointer
CollectionsListUpdateMarshalledPointer.restype = ctypes.c_int
CollectionsListUpdateMarshalledPointer.argtypes = [
    ctypes.c_void_p,  # Collection : SENSOR_COLLECTION_LIST* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	sensorsutilsv2 = windows.NewLazySystemDLL("SensorsUtilsV2.dll")
	procCollectionsListUpdateMarshalledPointer = sensorsutilsv2.NewProc("CollectionsListUpdateMarshalledPointer")
)

// Collection (SENSOR_COLLECTION_LIST* in/out)
r1, _, err := procCollectionsListUpdateMarshalledPointer.Call(
	uintptr(Collection),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // NTSTATUS
function CollectionsListUpdateMarshalledPointer(
  Collection: Pointer   // SENSOR_COLLECTION_LIST* in/out
): Integer; stdcall;
  external 'SensorsUtilsV2.dll' name 'CollectionsListUpdateMarshalledPointer';
result := DllCall("SensorsUtilsV2\CollectionsListUpdateMarshalledPointer"
    , "Ptr", Collection   ; SENSOR_COLLECTION_LIST* in/out
    , "Int")   ; return: NTSTATUS
●CollectionsListUpdateMarshalledPointer(Collection) = DLL("SensorsUtilsV2.dll", "int CollectionsListUpdateMarshalledPointer(void*)")
# 呼び出し: CollectionsListUpdateMarshalledPointer(Collection)
# Collection : SENSOR_COLLECTION_LIST* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。