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