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