ホーム › Globalization › ucnv_countStandards
ucnv_countStandards
関数ICUが認識する文字コード規格の数を返す。
シグネチャ
// icuuc.dll
#include <windows.h>
WORD ucnv_countStandards(void);パラメーターなし。戻り値: WORD
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
WORD ucnv_countStandards(void);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern ushort ucnv_countStandards();<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ucnv_countStandards() As UShort
End FunctionDeclare PtrSafe Function ucnv_countStandards Lib "icuuc" () As Integer
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ucnv_countStandards = ctypes.cdll.icuuc.ucnv_countStandards
ucnv_countStandards.restype = ctypes.c_ushort
ucnv_countStandards.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
ucnv_countStandards = Fiddle::Function.new(
lib['ucnv_countStandards'],
[],
-Fiddle::TYPE_SHORT, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn ucnv_countStandards() -> u16;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort ucnv_countStandards();
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ucnv_countStandards' -Namespace Win32 -PassThru
# $api::ucnv_countStandards()#uselib "icuuc.dll"
#func global ucnv_countStandards "ucnv_countStandards"
; ucnv_countStandards ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuuc.dll"
#cfunc global ucnv_countStandards "ucnv_countStandards"
; res = ucnv_countStandards(); WORD ucnv_countStandards()
#uselib "icuuc.dll"
#cfunc global ucnv_countStandards "ucnv_countStandards"
; res = ucnv_countStandards()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procucnv_countStandards = icuuc.NewProc("ucnv_countStandards")
)
r1, _, err := procucnv_countStandards.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // WORDfunction ucnv_countStandards: Word; cdecl;
external 'icuuc.dll' name 'ucnv_countStandards';result := DllCall("icuuc\ucnv_countStandards", "Cdecl UShort")●ucnv_countStandards() = DLL("icuuc.dll", "int ucnv_countStandards()")
# 呼び出し: ucnv_countStandards()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。