ホーム › Storage.IscsiDisc › ClearPersistentIScsiDevices
ClearPersistentIScsiDevices
関数登録済みの永続的iSCSIデバイスをすべてクリアする。
シグネチャ
// ISCSIDSC.dll
#include <windows.h>
DWORD ClearPersistentIScsiDevices(void);パラメーターなし。戻り値: DWORD
各言語での呼び出し定義
// ISCSIDSC.dll
#include <windows.h>
DWORD ClearPersistentIScsiDevices(void);[DllImport("ISCSIDSC.dll", ExactSpelling = true)]
static extern uint ClearPersistentIScsiDevices();<DllImport("ISCSIDSC.dll", ExactSpelling:=True)>
Public Shared Function ClearPersistentIScsiDevices() As UInteger
End FunctionDeclare PtrSafe Function ClearPersistentIScsiDevices Lib "iscsidsc" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ClearPersistentIScsiDevices = ctypes.windll.iscsidsc.ClearPersistentIScsiDevices
ClearPersistentIScsiDevices.restype = wintypes.DWORD
ClearPersistentIScsiDevices.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ISCSIDSC.dll')
ClearPersistentIScsiDevices = Fiddle::Function.new(
lib['ClearPersistentIScsiDevices'],
[],
-Fiddle::TYPE_INT)#[link(name = "iscsidsc")]
extern "system" {
fn ClearPersistentIScsiDevices() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ISCSIDSC.dll")]
public static extern uint ClearPersistentIScsiDevices();
"@
$api = Add-Type -MemberDefinition $sig -Name 'ISCSIDSC_ClearPersistentIScsiDevices' -Namespace Win32 -PassThru
# $api::ClearPersistentIScsiDevices()#uselib "ISCSIDSC.dll"
#func global ClearPersistentIScsiDevices "ClearPersistentIScsiDevices"
; ClearPersistentIScsiDevices ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "ISCSIDSC.dll"
#cfunc global ClearPersistentIScsiDevices "ClearPersistentIScsiDevices"
; res = ClearPersistentIScsiDevices(); DWORD ClearPersistentIScsiDevices()
#uselib "ISCSIDSC.dll"
#cfunc global ClearPersistentIScsiDevices "ClearPersistentIScsiDevices"
; res = ClearPersistentIScsiDevices()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
iscsidsc = windows.NewLazySystemDLL("ISCSIDSC.dll")
procClearPersistentIScsiDevices = iscsidsc.NewProc("ClearPersistentIScsiDevices")
)
r1, _, err := procClearPersistentIScsiDevices.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction ClearPersistentIScsiDevices: DWORD; stdcall;
external 'ISCSIDSC.dll' name 'ClearPersistentIScsiDevices';result := DllCall("ISCSIDSC\ClearPersistentIScsiDevices", "UInt")●ClearPersistentIScsiDevices() = DLL("ISCSIDSC.dll", "dword ClearPersistentIScsiDevices()")
# 呼び出し: ClearPersistentIScsiDevices()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。