ホーム › Devices.Sensors › CollectionsListMarshall
CollectionsListMarshall
関数コレクションリストを所定の形式へマーシャリングする。
シグネチャ
// SensorsUtilsV2.dll
#include <windows.h>
NTSTATUS CollectionsListMarshall(
SENSOR_COLLECTION_LIST* Target
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Target | SENSOR_COLLECTION_LIST* | inout |
戻り値の型: NTSTATUS
各言語での呼び出し定義
// SensorsUtilsV2.dll
#include <windows.h>
NTSTATUS CollectionsListMarshall(
SENSOR_COLLECTION_LIST* Target
);[DllImport("SensorsUtilsV2.dll", ExactSpelling = true)]
static extern int CollectionsListMarshall(
IntPtr Target // SENSOR_COLLECTION_LIST* in/out
);<DllImport("SensorsUtilsV2.dll", ExactSpelling:=True)>
Public Shared Function CollectionsListMarshall(
Target As IntPtr ' SENSOR_COLLECTION_LIST* in/out
) As Integer
End Function' Target : SENSOR_COLLECTION_LIST* in/out
Declare PtrSafe Function CollectionsListMarshall Lib "sensorsutilsv2" ( _
ByVal Target As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CollectionsListMarshall = ctypes.windll.sensorsutilsv2.CollectionsListMarshall
CollectionsListMarshall.restype = ctypes.c_int
CollectionsListMarshall.argtypes = [
ctypes.c_void_p, # Target : SENSOR_COLLECTION_LIST* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SensorsUtilsV2.dll')
CollectionsListMarshall = Fiddle::Function.new(
lib['CollectionsListMarshall'],
[
Fiddle::TYPE_VOIDP, # Target : SENSOR_COLLECTION_LIST* in/out
],
Fiddle::TYPE_INT)#[link(name = "sensorsutilsv2")]
extern "system" {
fn CollectionsListMarshall(
Target: *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 CollectionsListMarshall(IntPtr Target);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SensorsUtilsV2_CollectionsListMarshall' -Namespace Win32 -PassThru
# $api::CollectionsListMarshall(Target)#uselib "SensorsUtilsV2.dll"
#func global CollectionsListMarshall "CollectionsListMarshall" sptr
; CollectionsListMarshall varptr(Target) ; 戻り値は stat
; Target : SENSOR_COLLECTION_LIST* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "SensorsUtilsV2.dll" #cfunc global CollectionsListMarshall "CollectionsListMarshall" var ; res = CollectionsListMarshall(Target) ; Target : SENSOR_COLLECTION_LIST* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "SensorsUtilsV2.dll" #cfunc global CollectionsListMarshall "CollectionsListMarshall" sptr ; res = CollectionsListMarshall(varptr(Target)) ; Target : SENSOR_COLLECTION_LIST* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; NTSTATUS CollectionsListMarshall(SENSOR_COLLECTION_LIST* Target) #uselib "SensorsUtilsV2.dll" #cfunc global CollectionsListMarshall "CollectionsListMarshall" var ; res = CollectionsListMarshall(Target) ; Target : SENSOR_COLLECTION_LIST* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; NTSTATUS CollectionsListMarshall(SENSOR_COLLECTION_LIST* Target) #uselib "SensorsUtilsV2.dll" #cfunc global CollectionsListMarshall "CollectionsListMarshall" intptr ; res = CollectionsListMarshall(varptr(Target)) ; Target : SENSOR_COLLECTION_LIST* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
sensorsutilsv2 = windows.NewLazySystemDLL("SensorsUtilsV2.dll")
procCollectionsListMarshall = sensorsutilsv2.NewProc("CollectionsListMarshall")
)
// Target (SENSOR_COLLECTION_LIST* in/out)
r1, _, err := procCollectionsListMarshall.Call(
uintptr(Target),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // NTSTATUSfunction CollectionsListMarshall(
Target: Pointer // SENSOR_COLLECTION_LIST* in/out
): Integer; stdcall;
external 'SensorsUtilsV2.dll' name 'CollectionsListMarshall';result := DllCall("SensorsUtilsV2\CollectionsListMarshall"
, "Ptr", Target ; SENSOR_COLLECTION_LIST* in/out
, "Int") ; return: NTSTATUS●CollectionsListMarshall(Target) = DLL("SensorsUtilsV2.dll", "int CollectionsListMarshall(void*)")
# 呼び出し: CollectionsListMarshall(Target)
# Target : SENSOR_COLLECTION_LIST* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。