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

udatpg_getPatternForSkeleton

関数
指定スケルトンに対応する登録済みパターンを取得する。
DLLicuin.dll呼出規約cdecl

シグネチャ

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

WORD* udatpg_getPatternForSkeleton(
    const void** dtpg,
    const WORD* skeleton,
    INT skeletonLength,
    INT* pLength
);

パラメーター

名前方向
dtpgvoid**in
skeletonWORD*in
skeletonLengthINTin
pLengthINT*inout

戻り値の型: WORD*

各言語での呼び出し定義

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

WORD* udatpg_getPatternForSkeleton(
    const void** dtpg,
    const WORD* skeleton,
    INT skeletonLength,
    INT* pLength
);
[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr udatpg_getPatternForSkeleton(
    IntPtr dtpg,   // void**
    ref ushort skeleton,   // WORD*
    int skeletonLength,   // INT
    ref int pLength   // INT* in/out
);
<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function udatpg_getPatternForSkeleton(
    dtpg As IntPtr,   ' void**
    ByRef skeleton As UShort,   ' WORD*
    skeletonLength As Integer,   ' INT
    ByRef pLength As Integer   ' INT* in/out
) As IntPtr
End Function
' dtpg : void**
' skeleton : WORD*
' skeletonLength : INT
' pLength : INT* in/out
Declare PtrSafe Function udatpg_getPatternForSkeleton Lib "icuin" ( _
    ByVal dtpg As LongPtr, _
    ByRef skeleton As Integer, _
    ByVal skeletonLength As Long, _
    ByRef pLength As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

udatpg_getPatternForSkeleton = ctypes.cdll.icuin.udatpg_getPatternForSkeleton
udatpg_getPatternForSkeleton.restype = ctypes.c_void_p
udatpg_getPatternForSkeleton.argtypes = [
    ctypes.c_void_p,  # dtpg : void**
    ctypes.POINTER(ctypes.c_ushort),  # skeleton : WORD*
    ctypes.c_int,  # skeletonLength : INT
    ctypes.POINTER(ctypes.c_int),  # pLength : INT* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuin.dll')
udatpg_getPatternForSkeleton = Fiddle::Function.new(
  lib['udatpg_getPatternForSkeleton'],
  [
    Fiddle::TYPE_VOIDP,  # dtpg : void**
    Fiddle::TYPE_VOIDP,  # skeleton : WORD*
    Fiddle::TYPE_INT,  # skeletonLength : INT
    Fiddle::TYPE_VOIDP,  # pLength : INT* in/out
  ],
  Fiddle::TYPE_VOIDP, Fiddle::Function::CDECL)
#[link(name = "icuin")]
extern "C" {
    fn udatpg_getPatternForSkeleton(
        dtpg: *const *const (),  // void**
        skeleton: *const u16,  // WORD*
        skeletonLength: i32,  // INT
        pLength: *mut i32  // INT* in/out
    ) -> *mut u16;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr udatpg_getPatternForSkeleton(IntPtr dtpg, ref ushort skeleton, int skeletonLength, ref int pLength);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_udatpg_getPatternForSkeleton' -Namespace Win32 -PassThru
# $api::udatpg_getPatternForSkeleton(dtpg, skeleton, skeletonLength, pLength)
#uselib "icuin.dll"
#func global udatpg_getPatternForSkeleton "udatpg_getPatternForSkeleton" sptr, sptr, sptr, sptr
; udatpg_getPatternForSkeleton dtpg, varptr(skeleton), skeletonLength, varptr(pLength)   ; 戻り値は stat
; dtpg : void** -> "sptr"
; skeleton : WORD* -> "sptr"
; skeletonLength : INT -> "sptr"
; pLength : INT* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "icuin.dll"
#cfunc global udatpg_getPatternForSkeleton "udatpg_getPatternForSkeleton" sptr, var, int, var
; res = udatpg_getPatternForSkeleton(dtpg, skeleton, skeletonLength, pLength)
; dtpg : void** -> "sptr"
; skeleton : WORD* -> "var"
; skeletonLength : INT -> "int"
; pLength : INT* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; WORD* udatpg_getPatternForSkeleton(void** dtpg, WORD* skeleton, INT skeletonLength, INT* pLength)
#uselib "icuin.dll"
#cfunc global udatpg_getPatternForSkeleton "udatpg_getPatternForSkeleton" intptr, var, int, var
; res = udatpg_getPatternForSkeleton(dtpg, skeleton, skeletonLength, pLength)
; dtpg : void** -> "intptr"
; skeleton : WORD* -> "var"
; skeletonLength : INT -> "int"
; pLength : INT* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	procudatpg_getPatternForSkeleton = icuin.NewProc("udatpg_getPatternForSkeleton")
)

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