ホーム › Globalization › utext_freeze
utext_freeze
関数UTextを凍結し読み取り専用にする。
シグネチャ
// icuuc.dll
#include <windows.h>
void utext_freeze(
UText* ut
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ut | UText* | inout |
戻り値の型: void
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
void utext_freeze(
UText* ut
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void utext_freeze(
IntPtr ut // UText* in/out
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub utext_freeze(
ut As IntPtr ' UText* in/out
)
End Sub' ut : UText* in/out
Declare PtrSafe Sub utext_freeze Lib "icuuc" ( _
ByVal ut As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
utext_freeze = ctypes.cdll.icuuc.utext_freeze
utext_freeze.restype = None
utext_freeze.argtypes = [
ctypes.c_void_p, # ut : UText* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
utext_freeze = Fiddle::Function.new(
lib['utext_freeze'],
[
Fiddle::TYPE_VOIDP, # ut : UText* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn utext_freeze(
ut: *mut UText // UText* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void utext_freeze(IntPtr ut);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_utext_freeze' -Namespace Win32 -PassThru
# $api::utext_freeze(ut)#uselib "icuuc.dll"
#func global utext_freeze "utext_freeze" sptr
; utext_freeze varptr(ut)
; ut : UText* in/out -> "sptr"出力引数:
#uselib "icuuc.dll" #func global utext_freeze "utext_freeze" var ; utext_freeze ut ; ut : UText* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "icuuc.dll" #func global utext_freeze "utext_freeze" sptr ; utext_freeze varptr(ut) ; ut : UText* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void utext_freeze(UText* ut) #uselib "icuuc.dll" #func global utext_freeze "utext_freeze" var ; utext_freeze ut ; ut : UText* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void utext_freeze(UText* ut) #uselib "icuuc.dll" #func global utext_freeze "utext_freeze" intptr ; utext_freeze varptr(ut) ; ut : UText* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procutext_freeze = icuuc.NewProc("utext_freeze")
)
// ut (UText* in/out)
r1, _, err := procutext_freeze.Call(
uintptr(ut),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure utext_freeze(
ut: Pointer // UText* in/out
); cdecl;
external 'icuuc.dll' name 'utext_freeze';result := DllCall("icuuc\utext_freeze"
, "Ptr", ut ; UText* in/out
, "Cdecl Int") ; return: void●utext_freeze(ut) = DLL("icuuc.dll", "int utext_freeze(void*)")
# 呼び出し: utext_freeze(ut)
# ut : UText* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。