ホーム › Globalization › ucurr_unregister
ucurr_unregister
関数登録した通貨コードの登録を解除する。
シグネチャ
// icuuc.dll
#include <windows.h>
CHAR ucurr_unregister(
void* key,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| key | void* | inout |
| status | UErrorCode* | inout |
戻り値の型: CHAR
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
CHAR ucurr_unregister(
void* key,
UErrorCode* status
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte ucurr_unregister(
IntPtr key, // void* in/out
ref int status // UErrorCode* in/out
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ucurr_unregister(
key As IntPtr, ' void* in/out
ByRef status As Integer ' UErrorCode* in/out
) As SByte
End Function' key : void* in/out
' status : UErrorCode* in/out
Declare PtrSafe Function ucurr_unregister Lib "icuuc" ( _
ByVal key As LongPtr, _
ByRef status As Long) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ucurr_unregister = ctypes.cdll.icuuc.ucurr_unregister
ucurr_unregister.restype = ctypes.c_byte
ucurr_unregister.argtypes = [
ctypes.POINTER(None), # key : void* in/out
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
ucurr_unregister = Fiddle::Function.new(
lib['ucurr_unregister'],
[
Fiddle::TYPE_VOIDP, # key : void* in/out
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn ucurr_unregister(
key: *mut (), // void* in/out
status: *mut i32 // UErrorCode* in/out
) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte ucurr_unregister(IntPtr key, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ucurr_unregister' -Namespace Win32 -PassThru
# $api::ucurr_unregister(key, status)#uselib "icuuc.dll"
#func global ucurr_unregister "ucurr_unregister" sptr, sptr
; ucurr_unregister key, status ; 戻り値は stat
; key : void* in/out -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuuc.dll"
#cfunc global ucurr_unregister "ucurr_unregister" sptr, int
; res = ucurr_unregister(key, status)
; key : void* in/out -> "sptr"
; status : UErrorCode* in/out -> "int"; CHAR ucurr_unregister(void* key, UErrorCode* status)
#uselib "icuuc.dll"
#cfunc global ucurr_unregister "ucurr_unregister" intptr, int
; res = ucurr_unregister(key, status)
; key : void* in/out -> "intptr"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procucurr_unregister = icuuc.NewProc("ucurr_unregister")
)
// key (void* in/out), status (UErrorCode* in/out)
r1, _, err := procucurr_unregister.Call(
uintptr(key),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // CHARfunction ucurr_unregister(
key: Pointer; // void* in/out
status: Pointer // UErrorCode* in/out
): Shortint; cdecl;
external 'icuuc.dll' name 'ucurr_unregister';result := DllCall("icuuc\ucurr_unregister"
, "Ptr", key ; void* in/out
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Char") ; return: CHAR●ucurr_unregister(key, status) = DLL("icuuc.dll", "char ucurr_unregister(void*, void*)")
# 呼び出し: ucurr_unregister(key, status)
# key : void* in/out -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。