ホーム › NetworkManagement.Rras › MprConfigInterfaceDelete
MprConfigInterfaceDelete
関数ルーター構成から指定したインターフェイスを削除する。
シグネチャ
// MPRAPI.dll
#include <windows.h>
DWORD MprConfigInterfaceDelete(
HANDLE hMprConfig,
HANDLE hRouterInterface
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hMprConfig | HANDLE | in |
| hRouterInterface | HANDLE | in |
戻り値の型: DWORD
各言語での呼び出し定義
// MPRAPI.dll
#include <windows.h>
DWORD MprConfigInterfaceDelete(
HANDLE hMprConfig,
HANDLE hRouterInterface
);[DllImport("MPRAPI.dll", ExactSpelling = true)]
static extern uint MprConfigInterfaceDelete(
IntPtr hMprConfig, // HANDLE
IntPtr hRouterInterface // HANDLE
);<DllImport("MPRAPI.dll", ExactSpelling:=True)>
Public Shared Function MprConfigInterfaceDelete(
hMprConfig As IntPtr, ' HANDLE
hRouterInterface As IntPtr ' HANDLE
) As UInteger
End Function' hMprConfig : HANDLE
' hRouterInterface : HANDLE
Declare PtrSafe Function MprConfigInterfaceDelete Lib "mprapi" ( _
ByVal hMprConfig As LongPtr, _
ByVal hRouterInterface As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MprConfigInterfaceDelete = ctypes.windll.mprapi.MprConfigInterfaceDelete
MprConfigInterfaceDelete.restype = wintypes.DWORD
MprConfigInterfaceDelete.argtypes = [
wintypes.HANDLE, # hMprConfig : HANDLE
wintypes.HANDLE, # hRouterInterface : HANDLE
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MPRAPI.dll')
MprConfigInterfaceDelete = Fiddle::Function.new(
lib['MprConfigInterfaceDelete'],
[
Fiddle::TYPE_VOIDP, # hMprConfig : HANDLE
Fiddle::TYPE_VOIDP, # hRouterInterface : HANDLE
],
-Fiddle::TYPE_INT)#[link(name = "mprapi")]
extern "system" {
fn MprConfigInterfaceDelete(
hMprConfig: *mut core::ffi::c_void, // HANDLE
hRouterInterface: *mut core::ffi::c_void // HANDLE
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MPRAPI.dll")]
public static extern uint MprConfigInterfaceDelete(IntPtr hMprConfig, IntPtr hRouterInterface);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MPRAPI_MprConfigInterfaceDelete' -Namespace Win32 -PassThru
# $api::MprConfigInterfaceDelete(hMprConfig, hRouterInterface)#uselib "MPRAPI.dll"
#func global MprConfigInterfaceDelete "MprConfigInterfaceDelete" sptr, sptr
; MprConfigInterfaceDelete hMprConfig, hRouterInterface ; 戻り値は stat
; hMprConfig : HANDLE -> "sptr"
; hRouterInterface : HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MPRAPI.dll"
#cfunc global MprConfigInterfaceDelete "MprConfigInterfaceDelete" sptr, sptr
; res = MprConfigInterfaceDelete(hMprConfig, hRouterInterface)
; hMprConfig : HANDLE -> "sptr"
; hRouterInterface : HANDLE -> "sptr"; DWORD MprConfigInterfaceDelete(HANDLE hMprConfig, HANDLE hRouterInterface)
#uselib "MPRAPI.dll"
#cfunc global MprConfigInterfaceDelete "MprConfigInterfaceDelete" intptr, intptr
; res = MprConfigInterfaceDelete(hMprConfig, hRouterInterface)
; hMprConfig : HANDLE -> "intptr"
; hRouterInterface : HANDLE -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mprapi = windows.NewLazySystemDLL("MPRAPI.dll")
procMprConfigInterfaceDelete = mprapi.NewProc("MprConfigInterfaceDelete")
)
// hMprConfig (HANDLE), hRouterInterface (HANDLE)
r1, _, err := procMprConfigInterfaceDelete.Call(
uintptr(hMprConfig),
uintptr(hRouterInterface),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction MprConfigInterfaceDelete(
hMprConfig: THandle; // HANDLE
hRouterInterface: THandle // HANDLE
): DWORD; stdcall;
external 'MPRAPI.dll' name 'MprConfigInterfaceDelete';result := DllCall("MPRAPI\MprConfigInterfaceDelete"
, "Ptr", hMprConfig ; HANDLE
, "Ptr", hRouterInterface ; HANDLE
, "UInt") ; return: DWORD●MprConfigInterfaceDelete(hMprConfig, hRouterInterface) = DLL("MPRAPI.dll", "dword MprConfigInterfaceDelete(void*, void*)")
# 呼び出し: MprConfigInterfaceDelete(hMprConfig, hRouterInterface)
# hMprConfig : HANDLE -> "void*"
# hRouterInterface : HANDLE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。