Win32 API 日本語リファレンス
ホームNetworkManagement.Rras › MprConfigInterfaceTransportRemove

MprConfigInterfaceTransportRemove

関数
構成内のインターフェイスからトランスポートを削除する。
DLLMPRAPI.dll呼出規約winapi対応OSwindowsserver2000

シグネチャ

// MPRAPI.dll
#include <windows.h>

DWORD MprConfigInterfaceTransportRemove(
    HANDLE hMprConfig,
    HANDLE hRouterInterface,
    HANDLE hRouterIfTransport
);

パラメーター

名前方向
hMprConfigHANDLEin
hRouterInterfaceHANDLEin
hRouterIfTransportHANDLEin

戻り値の型: DWORD

各言語での呼び出し定義

// MPRAPI.dll
#include <windows.h>

DWORD MprConfigInterfaceTransportRemove(
    HANDLE hMprConfig,
    HANDLE hRouterInterface,
    HANDLE hRouterIfTransport
);
[DllImport("MPRAPI.dll", ExactSpelling = true)]
static extern uint MprConfigInterfaceTransportRemove(
    IntPtr hMprConfig,   // HANDLE
    IntPtr hRouterInterface,   // HANDLE
    IntPtr hRouterIfTransport   // HANDLE
);
<DllImport("MPRAPI.dll", ExactSpelling:=True)>
Public Shared Function MprConfigInterfaceTransportRemove(
    hMprConfig As IntPtr,   ' HANDLE
    hRouterInterface As IntPtr,   ' HANDLE
    hRouterIfTransport As IntPtr   ' HANDLE
) As UInteger
End Function
' hMprConfig : HANDLE
' hRouterInterface : HANDLE
' hRouterIfTransport : HANDLE
Declare PtrSafe Function MprConfigInterfaceTransportRemove Lib "mprapi" ( _
    ByVal hMprConfig As LongPtr, _
    ByVal hRouterInterface As LongPtr, _
    ByVal hRouterIfTransport As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MprConfigInterfaceTransportRemove = ctypes.windll.mprapi.MprConfigInterfaceTransportRemove
MprConfigInterfaceTransportRemove.restype = wintypes.DWORD
MprConfigInterfaceTransportRemove.argtypes = [
    wintypes.HANDLE,  # hMprConfig : HANDLE
    wintypes.HANDLE,  # hRouterInterface : HANDLE
    wintypes.HANDLE,  # hRouterIfTransport : HANDLE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MPRAPI.dll')
MprConfigInterfaceTransportRemove = Fiddle::Function.new(
  lib['MprConfigInterfaceTransportRemove'],
  [
    Fiddle::TYPE_VOIDP,  # hMprConfig : HANDLE
    Fiddle::TYPE_VOIDP,  # hRouterInterface : HANDLE
    Fiddle::TYPE_VOIDP,  # hRouterIfTransport : HANDLE
  ],
  -Fiddle::TYPE_INT)
#[link(name = "mprapi")]
extern "system" {
    fn MprConfigInterfaceTransportRemove(
        hMprConfig: *mut core::ffi::c_void,  // HANDLE
        hRouterInterface: *mut core::ffi::c_void,  // HANDLE
        hRouterIfTransport: *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 MprConfigInterfaceTransportRemove(IntPtr hMprConfig, IntPtr hRouterInterface, IntPtr hRouterIfTransport);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MPRAPI_MprConfigInterfaceTransportRemove' -Namespace Win32 -PassThru
# $api::MprConfigInterfaceTransportRemove(hMprConfig, hRouterInterface, hRouterIfTransport)
#uselib "MPRAPI.dll"
#func global MprConfigInterfaceTransportRemove "MprConfigInterfaceTransportRemove" sptr, sptr, sptr
; MprConfigInterfaceTransportRemove hMprConfig, hRouterInterface, hRouterIfTransport   ; 戻り値は stat
; hMprConfig : HANDLE -> "sptr"
; hRouterInterface : HANDLE -> "sptr"
; hRouterIfTransport : HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MPRAPI.dll"
#cfunc global MprConfigInterfaceTransportRemove "MprConfigInterfaceTransportRemove" sptr, sptr, sptr
; res = MprConfigInterfaceTransportRemove(hMprConfig, hRouterInterface, hRouterIfTransport)
; hMprConfig : HANDLE -> "sptr"
; hRouterInterface : HANDLE -> "sptr"
; hRouterIfTransport : HANDLE -> "sptr"
; DWORD MprConfigInterfaceTransportRemove(HANDLE hMprConfig, HANDLE hRouterInterface, HANDLE hRouterIfTransport)
#uselib "MPRAPI.dll"
#cfunc global MprConfigInterfaceTransportRemove "MprConfigInterfaceTransportRemove" intptr, intptr, intptr
; res = MprConfigInterfaceTransportRemove(hMprConfig, hRouterInterface, hRouterIfTransport)
; hMprConfig : HANDLE -> "intptr"
; hRouterInterface : HANDLE -> "intptr"
; hRouterIfTransport : HANDLE -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	mprapi = windows.NewLazySystemDLL("MPRAPI.dll")
	procMprConfigInterfaceTransportRemove = mprapi.NewProc("MprConfigInterfaceTransportRemove")
)

// hMprConfig (HANDLE), hRouterInterface (HANDLE), hRouterIfTransport (HANDLE)
r1, _, err := procMprConfigInterfaceTransportRemove.Call(
	uintptr(hMprConfig),
	uintptr(hRouterInterface),
	uintptr(hRouterIfTransport),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function MprConfigInterfaceTransportRemove(
  hMprConfig: THandle;   // HANDLE
  hRouterInterface: THandle;   // HANDLE
  hRouterIfTransport: THandle   // HANDLE
): DWORD; stdcall;
  external 'MPRAPI.dll' name 'MprConfigInterfaceTransportRemove';
result := DllCall("MPRAPI\MprConfigInterfaceTransportRemove"
    , "Ptr", hMprConfig   ; HANDLE
    , "Ptr", hRouterInterface   ; HANDLE
    , "Ptr", hRouterIfTransport   ; HANDLE
    , "UInt")   ; return: DWORD
●MprConfigInterfaceTransportRemove(hMprConfig, hRouterInterface, hRouterIfTransport) = DLL("MPRAPI.dll", "dword MprConfigInterfaceTransportRemove(void*, void*, void*)")
# 呼び出し: MprConfigInterfaceTransportRemove(hMprConfig, hRouterInterface, hRouterIfTransport)
# hMprConfig : HANDLE -> "void*"
# hRouterInterface : HANDLE -> "void*"
# hRouterIfTransport : HANDLE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。