Win32 API 日本語リファレンス
ホームStorage.IscsiDisc › RefreshISNSServerA

RefreshISNSServerA

関数
iSNSサーバーのターゲット情報を更新する(ANSI版)。
DLLISCSIDSC.dll文字セットANSI (-A)呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// ISCSIDSC.dll  (ANSI / -A)
#include <windows.h>

DWORD RefreshISNSServerA(
    LPSTR Address
);

パラメーター

名前方向
AddressLPSTRin

戻り値の型: DWORD

各言語での呼び出し定義

// ISCSIDSC.dll  (ANSI / -A)
#include <windows.h>

DWORD RefreshISNSServerA(
    LPSTR Address
);
[DllImport("ISCSIDSC.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern uint RefreshISNSServerA(
    [MarshalAs(UnmanagedType.LPStr)] string Address   // LPSTR
);
<DllImport("ISCSIDSC.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function RefreshISNSServerA(
    <MarshalAs(UnmanagedType.LPStr)> Address As String   ' LPSTR
) As UInteger
End Function
' Address : LPSTR
Declare PtrSafe Function RefreshISNSServerA 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

RefreshISNSServerA = ctypes.windll.iscsidsc.RefreshISNSServerA
RefreshISNSServerA.restype = wintypes.DWORD
RefreshISNSServerA.argtypes = [
    wintypes.LPCSTR,  # Address : LPSTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ISCSIDSC.dll')
RefreshISNSServerA = Fiddle::Function.new(
  lib['RefreshISNSServerA'],
  [
    Fiddle::TYPE_VOIDP,  # Address : LPSTR
  ],
  -Fiddle::TYPE_INT)
#[link(name = "iscsidsc")]
extern "system" {
    fn RefreshISNSServerA(
        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 RefreshISNSServerA([MarshalAs(UnmanagedType.LPStr)] string Address);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ISCSIDSC_RefreshISNSServerA' -Namespace Win32 -PassThru
# $api::RefreshISNSServerA(Address)
#uselib "ISCSIDSC.dll"
#func global RefreshISNSServerA "RefreshISNSServerA" sptr
; RefreshISNSServerA Address   ; 戻り値は stat
; Address : LPSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "ISCSIDSC.dll"
#cfunc global RefreshISNSServerA "RefreshISNSServerA" str
; res = RefreshISNSServerA(Address)
; Address : LPSTR -> "str"
; DWORD RefreshISNSServerA(LPSTR Address)
#uselib "ISCSIDSC.dll"
#cfunc global RefreshISNSServerA "RefreshISNSServerA" str
; res = RefreshISNSServerA(Address)
; Address : LPSTR -> "str"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	iscsidsc = windows.NewLazySystemDLL("ISCSIDSC.dll")
	procRefreshISNSServerA = iscsidsc.NewProc("RefreshISNSServerA")
)

// Address (LPSTR)
r1, _, err := procRefreshISNSServerA.Call(
	uintptr(unsafe.Pointer(windows.BytePtrFromString(Address))),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function RefreshISNSServerA(
  Address: PAnsiChar   // LPSTR
): DWORD; stdcall;
  external 'ISCSIDSC.dll' name 'RefreshISNSServerA';
result := DllCall("ISCSIDSC\RefreshISNSServerA"
    , "AStr", Address   ; LPSTR
    , "UInt")   ; return: DWORD
●RefreshISNSServerA(Address) = DLL("ISCSIDSC.dll", "dword RefreshISNSServerA(char*)")
# 呼び出し: RefreshISNSServerA(Address)
# Address : LPSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。