ホーム › NetworkManagement.WiFi › WlanFreeMemory
WlanFreeMemory
関数WLAN APIが返したメモリブロックを解放する。
シグネチャ
// wlanapi.dll
#include <windows.h>
void WlanFreeMemory(
void* pMemory
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pMemory | void* | in |
戻り値の型: void
各言語での呼び出し定義
// wlanapi.dll
#include <windows.h>
void WlanFreeMemory(
void* pMemory
);[DllImport("wlanapi.dll", ExactSpelling = true)]
static extern void WlanFreeMemory(
IntPtr pMemory // void*
);<DllImport("wlanapi.dll", ExactSpelling:=True)>
Public Shared Sub WlanFreeMemory(
pMemory As IntPtr ' void*
)
End Sub' pMemory : void*
Declare PtrSafe Sub WlanFreeMemory Lib "wlanapi" ( _
ByVal pMemory As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WlanFreeMemory = ctypes.windll.wlanapi.WlanFreeMemory
WlanFreeMemory.restype = None
WlanFreeMemory.argtypes = [
ctypes.POINTER(None), # pMemory : void*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('wlanapi.dll')
WlanFreeMemory = Fiddle::Function.new(
lib['WlanFreeMemory'],
[
Fiddle::TYPE_VOIDP, # pMemory : void*
],
Fiddle::TYPE_VOID)#[link(name = "wlanapi")]
extern "system" {
fn WlanFreeMemory(
pMemory: *mut () // void*
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("wlanapi.dll")]
public static extern void WlanFreeMemory(IntPtr pMemory);
"@
$api = Add-Type -MemberDefinition $sig -Name 'wlanapi_WlanFreeMemory' -Namespace Win32 -PassThru
# $api::WlanFreeMemory(pMemory)#uselib "wlanapi.dll"
#func global WlanFreeMemory "WlanFreeMemory" sptr
; WlanFreeMemory pMemory
; pMemory : void* -> "sptr"#uselib "wlanapi.dll"
#func global WlanFreeMemory "WlanFreeMemory" sptr
; WlanFreeMemory pMemory
; pMemory : void* -> "sptr"; void WlanFreeMemory(void* pMemory)
#uselib "wlanapi.dll"
#func global WlanFreeMemory "WlanFreeMemory" intptr
; WlanFreeMemory pMemory
; pMemory : void* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wlanapi = windows.NewLazySystemDLL("wlanapi.dll")
procWlanFreeMemory = wlanapi.NewProc("WlanFreeMemory")
)
// pMemory (void*)
r1, _, err := procWlanFreeMemory.Call(
uintptr(pMemory),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure WlanFreeMemory(
pMemory: Pointer // void*
); stdcall;
external 'wlanapi.dll' name 'WlanFreeMemory';result := DllCall("wlanapi\WlanFreeMemory"
, "Ptr", pMemory ; void*
, "Int") ; return: void●WlanFreeMemory(pMemory) = DLL("wlanapi.dll", "int WlanFreeMemory(void*)")
# 呼び出し: WlanFreeMemory(pMemory)
# pMemory : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。