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