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

uset_clone

関数
USetの複製を生成して返す。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

USet* uset_clone(
    const USet* set
);

パラメーター

名前方向
setUSet*in

戻り値の型: USet*

各言語での呼び出し定義

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

USet* uset_clone(
    const USet* set
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr uset_clone(
    ref IntPtr set   // USet*
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uset_clone(
    ByRef [set] As IntPtr   ' USet*
) As IntPtr
End Function
' set : USet*
Declare PtrSafe Function uset_clone Lib "icuuc" ( _
    ByRef set As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

uset_clone = ctypes.cdll.icuuc.uset_clone
uset_clone.restype = ctypes.c_void_p
uset_clone.argtypes = [
    ctypes.c_void_p,  # set : USet*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procuset_clone = icuuc.NewProc("uset_clone")
)

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