ホーム › UI.TabletPC › SetWordList
SetWordList
関数認識コンテキストに使用する単語リストを設定する。
シグネチャ
// inkobjcore.dll
#include <windows.h>
HRESULT SetWordList(
HRECOCONTEXT hrc,
HRECOWORDLIST hwl
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hrc | HRECOCONTEXT | in |
| hwl | HRECOWORDLIST | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// inkobjcore.dll
#include <windows.h>
HRESULT SetWordList(
HRECOCONTEXT hrc,
HRECOWORDLIST hwl
);[DllImport("inkobjcore.dll", ExactSpelling = true)]
static extern int SetWordList(
IntPtr hrc, // HRECOCONTEXT
IntPtr hwl // HRECOWORDLIST
);<DllImport("inkobjcore.dll", ExactSpelling:=True)>
Public Shared Function SetWordList(
hrc As IntPtr, ' HRECOCONTEXT
hwl As IntPtr ' HRECOWORDLIST
) As Integer
End Function' hrc : HRECOCONTEXT
' hwl : HRECOWORDLIST
Declare PtrSafe Function SetWordList Lib "inkobjcore" ( _
ByVal hrc As LongPtr, _
ByVal hwl As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SetWordList = ctypes.windll.inkobjcore.SetWordList
SetWordList.restype = ctypes.c_int
SetWordList.argtypes = [
wintypes.HANDLE, # hrc : HRECOCONTEXT
wintypes.HANDLE, # hwl : HRECOWORDLIST
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('inkobjcore.dll')
SetWordList = Fiddle::Function.new(
lib['SetWordList'],
[
Fiddle::TYPE_VOIDP, # hrc : HRECOCONTEXT
Fiddle::TYPE_VOIDP, # hwl : HRECOWORDLIST
],
Fiddle::TYPE_INT)#[link(name = "inkobjcore")]
extern "system" {
fn SetWordList(
hrc: *mut core::ffi::c_void, // HRECOCONTEXT
hwl: *mut core::ffi::c_void // HRECOWORDLIST
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("inkobjcore.dll")]
public static extern int SetWordList(IntPtr hrc, IntPtr hwl);
"@
$api = Add-Type -MemberDefinition $sig -Name 'inkobjcore_SetWordList' -Namespace Win32 -PassThru
# $api::SetWordList(hrc, hwl)#uselib "inkobjcore.dll"
#func global SetWordList "SetWordList" sptr, sptr
; SetWordList hrc, hwl ; 戻り値は stat
; hrc : HRECOCONTEXT -> "sptr"
; hwl : HRECOWORDLIST -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "inkobjcore.dll"
#cfunc global SetWordList "SetWordList" sptr, sptr
; res = SetWordList(hrc, hwl)
; hrc : HRECOCONTEXT -> "sptr"
; hwl : HRECOWORDLIST -> "sptr"; HRESULT SetWordList(HRECOCONTEXT hrc, HRECOWORDLIST hwl)
#uselib "inkobjcore.dll"
#cfunc global SetWordList "SetWordList" intptr, intptr
; res = SetWordList(hrc, hwl)
; hrc : HRECOCONTEXT -> "intptr"
; hwl : HRECOWORDLIST -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
inkobjcore = windows.NewLazySystemDLL("inkobjcore.dll")
procSetWordList = inkobjcore.NewProc("SetWordList")
)
// hrc (HRECOCONTEXT), hwl (HRECOWORDLIST)
r1, _, err := procSetWordList.Call(
uintptr(hrc),
uintptr(hwl),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction SetWordList(
hrc: THandle; // HRECOCONTEXT
hwl: THandle // HRECOWORDLIST
): Integer; stdcall;
external 'inkobjcore.dll' name 'SetWordList';result := DllCall("inkobjcore\SetWordList"
, "Ptr", hrc ; HRECOCONTEXT
, "Ptr", hwl ; HRECOWORDLIST
, "Int") ; return: HRESULT●SetWordList(hrc, hwl) = DLL("inkobjcore.dll", "int SetWordList(void*, void*)")
# 呼び出し: SetWordList(hrc, hwl)
# hrc : HRECOCONTEXT -> "void*"
# hwl : HRECOWORDLIST -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。