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

FwpmFreeMemory0

関数
WFP APIが割り当てたメモリを解放する。
DLLfwpuclnt.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

void FwpmFreeMemory0(
    void** p
);

パラメーター

名前方向
pvoid**inout

戻り値の型: void

各言語での呼び出し定義

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

void FwpmFreeMemory0(
    void** p
);
[DllImport("fwpuclnt.dll", ExactSpelling = true)]
static extern void FwpmFreeMemory0(
    IntPtr p   // void** in/out
);
<DllImport("fwpuclnt.dll", ExactSpelling:=True)>
Public Shared Sub FwpmFreeMemory0(
    p As IntPtr   ' void** in/out
)
End Sub
' p : void** in/out
Declare PtrSafe Sub FwpmFreeMemory0 Lib "fwpuclnt" ( _
    ByVal p As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

FwpmFreeMemory0 = ctypes.windll.fwpuclnt.FwpmFreeMemory0
FwpmFreeMemory0.restype = None
FwpmFreeMemory0.argtypes = [
    ctypes.c_void_p,  # p : void** in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('fwpuclnt.dll')
FwpmFreeMemory0 = Fiddle::Function.new(
  lib['FwpmFreeMemory0'],
  [
    Fiddle::TYPE_VOIDP,  # p : void** in/out
  ],
  Fiddle::TYPE_VOID)
#[link(name = "fwpuclnt")]
extern "system" {
    fn FwpmFreeMemory0(
        p: *mut *mut ()  // void** in/out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("fwpuclnt.dll")]
public static extern void FwpmFreeMemory0(IntPtr p);
"@
$api = Add-Type -MemberDefinition $sig -Name 'fwpuclnt_FwpmFreeMemory0' -Namespace Win32 -PassThru
# $api::FwpmFreeMemory0(p)
#uselib "fwpuclnt.dll"
#func global FwpmFreeMemory0 "FwpmFreeMemory0" sptr
; FwpmFreeMemory0 p
; p : void** in/out -> "sptr"
#uselib "fwpuclnt.dll"
#func global FwpmFreeMemory0 "FwpmFreeMemory0" sptr
; FwpmFreeMemory0 p
; p : void** in/out -> "sptr"
; void FwpmFreeMemory0(void** p)
#uselib "fwpuclnt.dll"
#func global FwpmFreeMemory0 "FwpmFreeMemory0" intptr
; FwpmFreeMemory0 p
; p : void** in/out -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	fwpuclnt = windows.NewLazySystemDLL("fwpuclnt.dll")
	procFwpmFreeMemory0 = fwpuclnt.NewProc("FwpmFreeMemory0")
)

// p (void** in/out)
r1, _, err := procFwpmFreeMemory0.Call(
	uintptr(p),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure FwpmFreeMemory0(
  p: Pointer   // void** in/out
); stdcall;
  external 'fwpuclnt.dll' name 'FwpmFreeMemory0';
result := DllCall("fwpuclnt\FwpmFreeMemory0"
    , "Ptr", p   ; void** in/out
    , "Int")   ; return: void
●FwpmFreeMemory0(p) = DLL("fwpuclnt.dll", "int FwpmFreeMemory0(void*)")
# 呼び出し: FwpmFreeMemory0(p)
# p : void** in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。