ホーム › Storage.IscsiDisc › RemoveISNSServerW
RemoveISNSServerW
関数登録済みのiSNSサーバーを探索対象から削除する。
シグネチャ
// ISCSIDSC.dll (Unicode / -W)
#include <windows.h>
DWORD RemoveISNSServerW(
LPWSTR Address
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Address | LPWSTR | in |
戻り値の型: DWORD
各言語での呼び出し定義
// ISCSIDSC.dll (Unicode / -W)
#include <windows.h>
DWORD RemoveISNSServerW(
LPWSTR Address
);[DllImport("ISCSIDSC.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint RemoveISNSServerW(
[MarshalAs(UnmanagedType.LPWStr)] string Address // LPWSTR
);<DllImport("ISCSIDSC.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function RemoveISNSServerW(
<MarshalAs(UnmanagedType.LPWStr)> Address As String ' LPWSTR
) As UInteger
End Function' Address : LPWSTR
Declare PtrSafe Function RemoveISNSServerW Lib "iscsidsc" ( _
ByVal Address As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RemoveISNSServerW = ctypes.windll.iscsidsc.RemoveISNSServerW
RemoveISNSServerW.restype = wintypes.DWORD
RemoveISNSServerW.argtypes = [
wintypes.LPCWSTR, # Address : LPWSTR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ISCSIDSC.dll')
RemoveISNSServerW = Fiddle::Function.new(
lib['RemoveISNSServerW'],
[
Fiddle::TYPE_VOIDP, # Address : LPWSTR
],
-Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "iscsidsc")]
extern "system" {
fn RemoveISNSServerW(
Address: *mut u16 // LPWSTR
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ISCSIDSC.dll", CharSet = CharSet.Unicode)]
public static extern uint RemoveISNSServerW([MarshalAs(UnmanagedType.LPWStr)] string Address);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ISCSIDSC_RemoveISNSServerW' -Namespace Win32 -PassThru
# $api::RemoveISNSServerW(Address)#uselib "ISCSIDSC.dll"
#func global RemoveISNSServerW "RemoveISNSServerW" wptr
; RemoveISNSServerW Address ; 戻り値は stat
; Address : LPWSTR -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "ISCSIDSC.dll"
#cfunc global RemoveISNSServerW "RemoveISNSServerW" wstr
; res = RemoveISNSServerW(Address)
; Address : LPWSTR -> "wstr"; DWORD RemoveISNSServerW(LPWSTR Address)
#uselib "ISCSIDSC.dll"
#cfunc global RemoveISNSServerW "RemoveISNSServerW" wstr
; res = RemoveISNSServerW(Address)
; Address : LPWSTR -> "wstr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
iscsidsc = windows.NewLazySystemDLL("ISCSIDSC.dll")
procRemoveISNSServerW = iscsidsc.NewProc("RemoveISNSServerW")
)
// Address (LPWSTR)
r1, _, err := procRemoveISNSServerW.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(Address))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction RemoveISNSServerW(
Address: PWideChar // LPWSTR
): DWORD; stdcall;
external 'ISCSIDSC.dll' name 'RemoveISNSServerW';result := DllCall("ISCSIDSC\RemoveISNSServerW"
, "WStr", Address ; LPWSTR
, "UInt") ; return: DWORD●RemoveISNSServerW(Address) = DLL("ISCSIDSC.dll", "dword RemoveISNSServerW(char*)")
# 呼び出し: RemoveISNSServerW(Address)
# Address : LPWSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。