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