Win32 API 日本語リファレンス
ホームDevices.BiometricFramework › WinBioFree

WinBioFree

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

シグネチャ

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

HRESULT WinBioFree(
    void* Address
);

パラメーター

名前方向
Addressvoid*in

戻り値の型: HRESULT

各言語での呼び出し定義

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

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

WinBioFree = ctypes.windll.winbio.WinBioFree
WinBioFree.restype = ctypes.c_int
WinBioFree.argtypes = [
    ctypes.POINTER(None),  # Address : void*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('winbio.dll')
WinBioFree = Fiddle::Function.new(
  lib['WinBioFree'],
  [
    Fiddle::TYPE_VOIDP,  # Address : void*
  ],
  Fiddle::TYPE_INT)
#[link(name = "winbio")]
extern "system" {
    fn WinBioFree(
        Address: *mut ()  // void*
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("winbio.dll")]
public static extern int WinBioFree(IntPtr Address);
"@
$api = Add-Type -MemberDefinition $sig -Name 'winbio_WinBioFree' -Namespace Win32 -PassThru
# $api::WinBioFree(Address)
#uselib "winbio.dll"
#func global WinBioFree "WinBioFree" sptr
; WinBioFree Address   ; 戻り値は stat
; Address : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "winbio.dll"
#cfunc global WinBioFree "WinBioFree" sptr
; res = WinBioFree(Address)
; Address : void* -> "sptr"
; HRESULT WinBioFree(void* Address)
#uselib "winbio.dll"
#cfunc global WinBioFree "WinBioFree" intptr
; res = WinBioFree(Address)
; Address : void* -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	winbio = windows.NewLazySystemDLL("winbio.dll")
	procWinBioFree = winbio.NewProc("WinBioFree")
)

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