Win32 API 日本語リファレンス
ホームSecurity.Cryptography › SslFreeBuffer

SslFreeBuffer

関数
SSL関数が割り当てたバッファを解放する。
DLLncrypt.dll呼出規約winapi

シグネチャ

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

HRESULT SslFreeBuffer(
    void* pvInput
);

パラメーター

名前方向
pvInputvoid*inout

戻り値の型: HRESULT

各言語での呼び出し定義

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

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

SslFreeBuffer = ctypes.windll.ncrypt.SslFreeBuffer
SslFreeBuffer.restype = ctypes.c_int
SslFreeBuffer.argtypes = [
    ctypes.POINTER(None),  # pvInput : void* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	ncrypt = windows.NewLazySystemDLL("ncrypt.dll")
	procSslFreeBuffer = ncrypt.NewProc("SslFreeBuffer")
)

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