ホーム › Globalization › ulocdata_setNoSubstitute
ulocdata_setNoSubstitute
関数ロケールデータの代替不使用設定を行う。
シグネチャ
// icuin.dll
#include <windows.h>
void ulocdata_setNoSubstitute(
ULocaleData* uld,
CHAR setting
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| uld | ULocaleData* | inout |
| setting | CHAR | in |
戻り値の型: void
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
void ulocdata_setNoSubstitute(
ULocaleData* uld,
CHAR setting
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void ulocdata_setNoSubstitute(
ref IntPtr uld, // ULocaleData* in/out
sbyte setting // CHAR
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub ulocdata_setNoSubstitute(
ByRef uld As IntPtr, ' ULocaleData* in/out
setting As SByte ' CHAR
)
End Sub' uld : ULocaleData* in/out
' setting : CHAR
Declare PtrSafe Sub ulocdata_setNoSubstitute Lib "icuin" ( _
ByRef uld As LongPtr, _
ByVal setting As Byte)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ulocdata_setNoSubstitute = ctypes.cdll.icuin.ulocdata_setNoSubstitute
ulocdata_setNoSubstitute.restype = None
ulocdata_setNoSubstitute.argtypes = [
ctypes.c_void_p, # uld : ULocaleData* in/out
ctypes.c_byte, # setting : CHAR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
ulocdata_setNoSubstitute = Fiddle::Function.new(
lib['ulocdata_setNoSubstitute'],
[
Fiddle::TYPE_VOIDP, # uld : ULocaleData* in/out
Fiddle::TYPE_CHAR, # setting : CHAR
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn ulocdata_setNoSubstitute(
uld: *mut isize, // ULocaleData* in/out
setting: i8 // CHAR
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void ulocdata_setNoSubstitute(ref IntPtr uld, sbyte setting);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_ulocdata_setNoSubstitute' -Namespace Win32 -PassThru
# $api::ulocdata_setNoSubstitute(uld, setting)#uselib "icuin.dll"
#func global ulocdata_setNoSubstitute "ulocdata_setNoSubstitute" sptr, sptr
; ulocdata_setNoSubstitute uld, setting
; uld : ULocaleData* in/out -> "sptr"
; setting : CHAR -> "sptr"#uselib "icuin.dll"
#func global ulocdata_setNoSubstitute "ulocdata_setNoSubstitute" int, int
; ulocdata_setNoSubstitute uld, setting
; uld : ULocaleData* in/out -> "int"
; setting : CHAR -> "int"; void ulocdata_setNoSubstitute(ULocaleData* uld, CHAR setting)
#uselib "icuin.dll"
#func global ulocdata_setNoSubstitute "ulocdata_setNoSubstitute" int, int
; ulocdata_setNoSubstitute uld, setting
; uld : ULocaleData* in/out -> "int"
; setting : CHAR -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
proculocdata_setNoSubstitute = icuin.NewProc("ulocdata_setNoSubstitute")
)
// uld (ULocaleData* in/out), setting (CHAR)
r1, _, err := proculocdata_setNoSubstitute.Call(
uintptr(uld),
uintptr(setting),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure ulocdata_setNoSubstitute(
uld: Pointer; // ULocaleData* in/out
setting: Shortint // CHAR
); cdecl;
external 'icuin.dll' name 'ulocdata_setNoSubstitute';result := DllCall("icuin\ulocdata_setNoSubstitute"
, "Ptr", uld ; ULocaleData* in/out
, "Char", setting ; CHAR
, "Cdecl Int") ; return: void●ulocdata_setNoSubstitute(uld, setting) = DLL("icuin.dll", "int ulocdata_setNoSubstitute(void*, char)")
# 呼び出し: ulocdata_setNoSubstitute(uld, setting)
# uld : ULocaleData* in/out -> "void*"
# setting : CHAR -> "char"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。