Win32 API 日本語リファレンス
ホームGlobalization › uregex_close

uregex_close

関数
正規表現オブジェクトを破棄して解放する。
DLLicuin.dll呼出規約cdecl

シグネチャ

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

void uregex_close(
    URegularExpression* regexp
);

パラメーター

名前方向
regexpURegularExpression*inout

戻り値の型: void

各言語での呼び出し定義

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

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

uregex_close = ctypes.cdll.icuin.uregex_close
uregex_close.restype = None
uregex_close.argtypes = [
    ctypes.c_void_p,  # regexp : URegularExpression* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuin.dll')
uregex_close = Fiddle::Function.new(
  lib['uregex_close'],
  [
    Fiddle::TYPE_VOIDP,  # regexp : URegularExpression* in/out
  ],
  Fiddle::TYPE_VOID, Fiddle::Function::CDECL)
#[link(name = "icuin")]
extern "C" {
    fn uregex_close(
        regexp: *mut isize  // URegularExpression* in/out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void uregex_close(ref IntPtr regexp);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uregex_close' -Namespace Win32 -PassThru
# $api::uregex_close(regexp)
#uselib "icuin.dll"
#func global uregex_close "uregex_close" sptr
; uregex_close regexp
; regexp : URegularExpression* in/out -> "sptr"
#uselib "icuin.dll"
#func global uregex_close "uregex_close" int
; uregex_close regexp
; regexp : URegularExpression* in/out -> "int"
; void uregex_close(URegularExpression* regexp)
#uselib "icuin.dll"
#func global uregex_close "uregex_close" int
; uregex_close regexp
; regexp : URegularExpression* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	procuregex_close = icuin.NewProc("uregex_close")
)

// regexp (URegularExpression* in/out)
r1, _, err := procuregex_close.Call(
	uintptr(regexp),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure uregex_close(
  regexp: Pointer   // URegularExpression* in/out
); cdecl;
  external 'icuin.dll' name 'uregex_close';
result := DllCall("icuin\uregex_close"
    , "Ptr", regexp   ; URegularExpression* in/out
    , "Cdecl Int")   ; return: void
●uregex_close(regexp) = DLL("icuin.dll", "int uregex_close(void*)")
# 呼び出し: uregex_close(regexp)
# regexp : URegularExpression* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。