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