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