ホーム › Storage.IscsiDisc › AddRadiusServerA
AddRadiusServerA
関数iSCSI認証用のRADIUSサーバーを追加する(ANSI版)。
シグネチャ
// ISCSIDSC.dll (ANSI / -A)
#include <windows.h>
DWORD AddRadiusServerA(
LPSTR Address
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Address | LPSTR | in |
戻り値の型: DWORD
各言語での呼び出し定義
// ISCSIDSC.dll (ANSI / -A)
#include <windows.h>
DWORD AddRadiusServerA(
LPSTR Address
);[DllImport("ISCSIDSC.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern uint AddRadiusServerA(
[MarshalAs(UnmanagedType.LPStr)] string Address // LPSTR
);<DllImport("ISCSIDSC.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function AddRadiusServerA(
<MarshalAs(UnmanagedType.LPStr)> Address As String ' LPSTR
) As UInteger
End Function' Address : LPSTR
Declare PtrSafe Function AddRadiusServerA Lib "iscsidsc" ( _
ByVal Address As String) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
AddRadiusServerA = ctypes.windll.iscsidsc.AddRadiusServerA
AddRadiusServerA.restype = wintypes.DWORD
AddRadiusServerA.argtypes = [
wintypes.LPCSTR, # Address : LPSTR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ISCSIDSC.dll')
AddRadiusServerA = Fiddle::Function.new(
lib['AddRadiusServerA'],
[
Fiddle::TYPE_VOIDP, # Address : LPSTR
],
-Fiddle::TYPE_INT)#[link(name = "iscsidsc")]
extern "system" {
fn AddRadiusServerA(
Address: *mut u8 // LPSTR
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ISCSIDSC.dll", CharSet = CharSet.Ansi)]
public static extern uint AddRadiusServerA([MarshalAs(UnmanagedType.LPStr)] string Address);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ISCSIDSC_AddRadiusServerA' -Namespace Win32 -PassThru
# $api::AddRadiusServerA(Address)#uselib "ISCSIDSC.dll"
#func global AddRadiusServerA "AddRadiusServerA" sptr
; AddRadiusServerA Address ; 戻り値は stat
; Address : LPSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "ISCSIDSC.dll"
#cfunc global AddRadiusServerA "AddRadiusServerA" str
; res = AddRadiusServerA(Address)
; Address : LPSTR -> "str"; DWORD AddRadiusServerA(LPSTR Address)
#uselib "ISCSIDSC.dll"
#cfunc global AddRadiusServerA "AddRadiusServerA" str
; res = AddRadiusServerA(Address)
; Address : LPSTR -> "str"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
iscsidsc = windows.NewLazySystemDLL("ISCSIDSC.dll")
procAddRadiusServerA = iscsidsc.NewProc("AddRadiusServerA")
)
// Address (LPSTR)
r1, _, err := procAddRadiusServerA.Call(
uintptr(unsafe.Pointer(windows.BytePtrFromString(Address))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction AddRadiusServerA(
Address: PAnsiChar // LPSTR
): DWORD; stdcall;
external 'ISCSIDSC.dll' name 'AddRadiusServerA';result := DllCall("ISCSIDSC\AddRadiusServerA"
, "AStr", Address ; LPSTR
, "UInt") ; return: DWORD●AddRadiusServerA(Address) = DLL("ISCSIDSC.dll", "dword AddRadiusServerA(char*)")
# 呼び出し: AddRadiusServerA(Address)
# Address : LPSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。