Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.9 KiB

  1. /****************************************************************************
  2. *
  3. * recogDLL.h
  4. * created: 13 March 2000
  5. * mrevow
  6. *
  7. * Support routines for loading the DLL and calling its api.
  8. * This library supports the following API:
  9. *
  10. * OpenRecognizer();
  11. * DoXXX() - One for each function tin the DLL api
  12. * CloseRecognizer();
  13. *
  14. * Error return policy.
  15. *
  16. * 1) The only error that OpenRecognizer will report if it cannot find the DLL
  17. * The DoXXX() routines will pass on the **real** API error return. If the API
  18. * does not exist in the DLL it will return HRCR_UNSUPPORTED
  19. *
  20. * Here is the preferred usage
  21. *
  22. * void *pvRecog;
  23. * unsigned char *pRecogDLL = "madusa.dll";
  24. * pvRecog = OpenRecognizer("madusa.dll");
  25. * if (!pvRecog);
  26. * {
  27. * printf("Cannot find madusa.dll\n");
  28. * exit (1);
  29. * }
  30. *
  31. * hrc = DoCreateCompatibleHRC();
  32. * .
  33. * .
  34. * .
  35. * CloseRecognizer(pvRecog);
  36. *
  37. ******************************************************************************/
  38. #ifndef H_RECOGDLL_H
  39. #define H_RECOGDLL_H
  40. #include "common.h"
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. extern void * OpenRecognizer(const char *name);
  45. extern const char *DoRecogDLLName(void *pv);
  46. extern void CloseRecognizer(void * pv);
  47. // Available Api's
  48. extern const char *DoRecogDLLName(void *pv);
  49. extern int DoConfigRecognizer(void *pv, unsigned int uSubFunc, WPARAM wParam, LPARAM lParam);
  50. extern HRC DoCreateCompatibleHRC(void *pv, HRC hrc, HREC hrecUnused);
  51. extern int DoSetAlphabetHRC(void *pv, HRC hrc, ALC alc, LPBYTE pbUnused);
  52. extern int DoSetGuideHRC(void *pv, HRC hrc, LPGUIDE lpguide, UINT nFirstVisible);
  53. extern int DoSetRecogSpeedHRC(void *pv, HRC hrc, int iSpeed);
  54. extern int DoDestroyHRC(void *pv, HRC hrc);
  55. extern int DoAddPenInputHRC(void *pv, HRC hrc, POINT *rgPoint, LPVOID lpvUnused, UINT uiUnused, STROKEINFO *pSi);
  56. extern int DoEndPenInputHRC(void *pv, HRC hrc);
  57. extern int DoProcessHRC(void *pv, HRC hrc, DWORD dwUnused);
  58. extern int DoHwxGetWordResults(void *pv, HRC hrc, UINT cAlt, char *buffer, UINT buflen);
  59. extern int DoHwxGetCosts(void *pv, HRC hrc, UINT cAltMax, int *rgCost);
  60. extern int DoHwxGetNeuralOutput(void *pv, HRC hrc, void *buffer, UINT buflen);
  61. extern int DoHwxGetInputFeatures(void *pv, HRC hrc, unsigned short *rgFeat, UINT cWidth);
  62. extern void DoHwxSetPrivateRecInfo(void *pv, void *v);
  63. extern int DoHwxSetAnswer(void *pv, char *sz);
  64. extern int DoSetWordlistCoercionHRC(void *pv, HRC hrc, UINT uCoercion);
  65. extern HWL DoCreateHWL(void *pv, HREC hrec, LPSTR lpsz, UINT uType, DWORD dwReserved);
  66. extern int DoDestroyHWL(void *pv, HWL hwl);
  67. extern int DoSetWordlistHRC(void *pv, HRC hrc, HWL hwl);
  68. extern int DoEnableSystemDictionaryHRC(void *pv, HRC hrc, BOOL fEnable);
  69. extern int DoEnableLangModelHRC(void *pv, HRC hrc, BOOL fEnable);
  70. extern BOOL DoIsStringSupportedHRC(void *pv, HRC hrc, unsigned char *sz);
  71. extern int DoGetMaxResultsHRC(void *pv, HRC hrc);
  72. extern int DoSetMaxResultsHRC(void *pv, HRC hrc, UINT cAltMax);
  73. extern int DoGetResultsHRC(void *pv, HRC hrc, UINT uType, HRCRESULT *pResults, UINT cResults);
  74. extern int DoGetAlternateWordsHRCRESULT(void *pv, HRCRESULT hrcresult, UINT iSyv, UINT cSyv, HRCRESULT *pResults, UINT cResults);
  75. extern int DoGetSymbolsHRCRESULT(void *pv, HRCRESULT hrcresult, UINT iSyv, SYV *pSyv, UINT cSyv);
  76. extern int DoGetSymbolCountHRCRESULT(void *pv, HRCRESULT hrcresult);
  77. extern BOOL DoSymbolToCharacter(void *pv, SYV *pSyv, int cSyv, char *sz, int *pConv);
  78. extern BOOL DoSymbolToCharacterW(void *pv, SYV *pSyv, int cSyv, WCHAR *wsz, int *pConv);
  79. extern int DoGetCostHRCRESULT(void *pv, HRCRESULT hrcresult);
  80. extern int DoDestroyHRCRESULT(void *pv, HRCRESULT hrcresult);
  81. extern HINKSET DoCreateInksetHRCRESULT(void *pv, HRCRESULT hrcresult, unsigned int iSyv, unsigned int cSyv);
  82. extern BOOL DoDestroyInkset(void *pv, HINKSET hInkset);
  83. extern int DoGetInksetInterval(void *pv, HINKSET hInkset, unsigned int uIndex, INTERVAL *pI);
  84. extern int DoGetInksetIntervalCount(void *pv, HINKSET hInkset);
  85. extern DWORD DoGetTiming(void *pv, void *pVoid, BOOL bReset);
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif