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

ulocdata_getNoSubstitute

関数
ロケールデータの代替不使用設定を取得する。
DLLicuin.dll呼出規約cdecl

シグネチャ

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

CHAR ulocdata_getNoSubstitute(
    ULocaleData* uld
);

パラメーター

名前方向
uldULocaleData*inout

戻り値の型: CHAR

各言語での呼び出し定義

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

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

ulocdata_getNoSubstitute = ctypes.cdll.icuin.ulocdata_getNoSubstitute
ulocdata_getNoSubstitute.restype = ctypes.c_byte
ulocdata_getNoSubstitute.argtypes = [
    ctypes.c_void_p,  # uld : ULocaleData* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuin.dll')
ulocdata_getNoSubstitute = Fiddle::Function.new(
  lib['ulocdata_getNoSubstitute'],
  [
    Fiddle::TYPE_VOIDP,  # uld : ULocaleData* in/out
  ],
  Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)
#[link(name = "icuin")]
extern "C" {
    fn ulocdata_getNoSubstitute(
        uld: *mut isize  // ULocaleData* in/out
    ) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte ulocdata_getNoSubstitute(ref IntPtr uld);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_ulocdata_getNoSubstitute' -Namespace Win32 -PassThru
# $api::ulocdata_getNoSubstitute(uld)
#uselib "icuin.dll"
#func global ulocdata_getNoSubstitute "ulocdata_getNoSubstitute" sptr
; ulocdata_getNoSubstitute uld   ; 戻り値は stat
; uld : ULocaleData* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icuin.dll"
#cfunc global ulocdata_getNoSubstitute "ulocdata_getNoSubstitute" int
; res = ulocdata_getNoSubstitute(uld)
; uld : ULocaleData* in/out -> "int"
; CHAR ulocdata_getNoSubstitute(ULocaleData* uld)
#uselib "icuin.dll"
#cfunc global ulocdata_getNoSubstitute "ulocdata_getNoSubstitute" int
; res = ulocdata_getNoSubstitute(uld)
; uld : ULocaleData* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	proculocdata_getNoSubstitute = icuin.NewProc("ulocdata_getNoSubstitute")
)

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