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.

503 lines
23 KiB

  1. /********************************************************************
  2. ProofBase.h - Base API definitions for CSAPI, CTAPI, & CHAPI
  3. Speller, Thesaurus, and Hyphenator
  4. Version 3.0 - all api's
  5. History:
  6. 5/97 DougP Created
  7. 12/97 DougP Copied from ProofAPI.h and Separated into tool section files
  8. 5/99 aarayas Copied Vendor.h into proofbase to elminate many files to copied for Thai wordbreak.
  9. The Natural Language Group maintains this file.
  10. The end user license agreement (EULA) for CSAPI, CHAPI, or CTAPI covers this source file. Do not disclose it to third parties.
  11. You are not entitled to any support or assistance from Microsoft Corporation regarding your use of this program.
  12. 1997-1998 Microsoft Corporation. All rights reserved.
  13. ********************************************************************/
  14. #if !defined(PROOFBASE_H)
  15. #define PROOFBASE_H
  16. #pragma pack(push, proofapi_h, 8) // default alignment
  17. // The Following code was taken from NLG group vendor.h
  18. #if !defined(VENDOR_H)
  19. #define VENDOR_H
  20. /* unified codes */
  21. // I originally used an enum here - but RC doesn't like it
  22. typedef int VENDORID; // vendorid
  23. #define vendoridSoftArt 1
  24. #define vendoridInso 2
  25. // these came from the original list from the speller
  26. // but don't conflict with any others - so they are safe for all tools
  27. #define vendoridInformatic 17 /* Informatic - Russian (Mssp_ru.lex, Mspru32.dll) */
  28. #define vendoridAmebis 18 /* Amebis - Slovenian(Mssp_sl.lex, Mspsl32.dll) and Serbian(Mssp_sr.lex, Mspsr32.dll) */
  29. #define vendoridLogos 19 /* Logos - Czech(Mssp_cz.lex, Mspcz32.dll) */
  30. #define vendoridDatecs 20 /* Datecs - Bulgarian(Mssp_bg.lex, Mspbg32.dll) */
  31. #define vendoridFilosoft 21 /* Filosoft - Estonian(Mssp_et.lex, Mspet32.dll) */
  32. #define vendoridLingsoft 22 /* Lingsoft - German(Mssp3ge.lex,Mssp3ge.dll), Danish(Mssp_da.lex,Mspda32.dll), Norwegian(Mssp_no.lex, Mspno32.dll), Finnish(Mssp_fi.lex, Mspfi32.dll) and Swedish(Mssp_sw.lex, Mspsw32.dll) */
  33. #define vendoridPolderland 23 /* Polderland - Dutch(Mssp_nl.lex, Mspnl32.dll) */
  34. #define vendoridMicrosoft 64
  35. #define vendoridSynapse 65 /* Synapse - French(Spelling:Mssp3fr.lex, Mssp3fr.dll) */
  36. #define vendoridFotonija 66 /* Fotonija - Lithuanian(Spelling:Mssp_lt.lex, Msplt32.dll) - added 3/25/97 */
  37. #define vendoridFotonja vendoridFotonija /* To make up for earlier misspelling */
  38. #define vendoridHizkia 67 /* Hizkia -Basque (Spelling:Mssp_eu.lex, Mspeu32.dll) - added 5/21/97 */
  39. #define vendoridExpertSystem 68 /* ExpertSystem - Italian(Spelling:Mssp3lt.lex, Mssp3lt.dll) - added 7/17/97 */
  40. #define vendoridWYSIWYG 69 /* Various languages as an addon - 2/2/98 */
  41. // next five added at Ireland's request 3/27/98
  42. #define vendoridSYS 70 // Croatian - Spelling:Mssp_cr.lex, Mspcr32.dll
  43. #define vendoridTilde 71 // Latvian - Spelling:Mssp_lv.lex, Msplv32.dll
  44. #define vendoridSignum 72 // Spanish - Spelling:Mssp3es.lex, Mssp3es.dll
  45. #define vendoridProLing 73 // Ukrainian - Spelling:Mssp3ua.lex, Mssp3ua.dll
  46. #define vendoridItautecPhilcoSA 74 // Brazilian - Spelling:mssp3PB.lex, Mssp3PB.dll
  47. #define vendoridPriberam 75 /* Priberam Inform�tica - Portuguese - 7/13/98 */
  48. #define vendoridTranquility 76 /* Tranquility Software - Vietnamese - 7/22/98 */
  49. #define vendoridColtec 77 /* Coltec - Arabic - added 8/17/98 */
  50. /*************** legacy codes ******************/
  51. /* Spell Engine Id's */
  52. #define sidSA vendoridSoftArt /* Reserved */
  53. #define sidInso vendoridInso /* Inso */
  54. #define sidHM sidInso /* Inso was Houghton Mifflin */
  55. #define sidML 3 /* MicroLytics */
  56. #define sidLS 4 /* LanSer Data */
  57. #define sidCT 5 /* Center of Educational Technology */
  58. #define sidHS 6 /* HSoft - Turkish(mssp_tr.lex, Msptr32.dll)*/
  59. #define sidMO 7 /* Morphologic - Romanian(Mssp_ro.lex, Msthro32.dll) and Hungarian(Mssp_hu.lex, Msphu32.dll) */
  60. #define sidTI 8 /* TIP - Polish(Mssp_pl.lex, Mspl32.dll) */
  61. #define sidTIP sidTI
  62. #define sidKF 9 /* Korean Foreign Language University */
  63. #define sidKFL sidKF
  64. #define sidPI 10 /* Priberam Informatica Lince - Portuguese(Mssp3PT.lex, Mssp3PT.dll) */
  65. #define sidPIL sidPI
  66. #define sidColtec 11 /* Coltec (Arabic) */
  67. #define sidGS sidColtec /* Glyph Systems - this was an error */
  68. #define sidRA 12 /* Radiar (Romansch) */
  69. #define sidIN 13 /* Intracom - Greek(Mssp_el.lex, Mspel32.dll) */
  70. #define sidSY 14 /* Sylvan */
  71. #define sidHI 15 /* Hizkia (obsolete - use vendoridHizkia) */
  72. #define sidFO 16 /* Forma - Slovak(Mssp_sk.lex, Mspsk32.dll) */
  73. #define sidIF vendoridInformatic /* Informatic - Russian (Mssp_ru.lex, Mspru32.dll) */
  74. #define sidAM vendoridAmebis /* Amebis - Slovenian(Mssp_sl.lex, Mspsl32.dll) and Serbian(Mssp_sr.lex, Mspsr32.dll) */
  75. #define sidLO vendoridLogos /* Logos - Czech(Mssp_cz.lex, Mspcz32.dll) */
  76. #define sidDT vendoridDatecs /* Datecs - Bulgarian(Mssp_bg.lex, Mspbg32.dll) */
  77. #define sidFS vendoridFilosoft /* Filosoft - Estonian(Mssp_et.lex, Mspet32.dll) */
  78. #define sidLI vendoridLingsoft /* Lingsoft - German(Mssp3ge.lex,Mssp3ge.dll), Danish(Mssp_da.lex,Mspda32.dll), Norwegian(Mssp_no.lex, Mspno32.dll), Finnish(Mssp_fi.lex, Mspfi32.dll) and Swedish(Mssp_sw.lex, Mspsw32.dll) */
  79. #define sidPL vendoridPolderland /* Polderland - Dutch(Mssp_nl.lex, Mspnl32.dll) */
  80. /* Thesaurus Engine Id's */
  81. #define teidSA vendoridSoftArt
  82. #define teidInso vendoridInso /* Inso */
  83. #define teidHM teidInso /* Inso was Houghton-Mifflin */
  84. #define teidIF 3 /* Informatic */
  85. #define teidIN 4 /* Intracom */
  86. #define teidMO 5 /* MorphoLogic */
  87. #define teidTI 6 /* TiP */
  88. #define teidPI 7 /* Priberam Informatica Lince */
  89. #define teidAM 8 /* Amebis */
  90. #define teidDT 9 /* Datecs */
  91. #define teidES 10 /* Expert System */
  92. #define teidFS 11 /* Filosoft */
  93. #define teidFO 12 /* Forma */
  94. #define teidHS 13 /* HSoft */
  95. #define teidLI 14 /* Lingsoft */
  96. #define teidLO 15 /* Logos */
  97. #define teidPL 16 /* Polderland */
  98. /* HYphenation Engine ID's */
  99. #define hidSA vendoridSoftArt
  100. #define hidHM vendoridInso /* Houghton Mifflin */
  101. #define hidML 3 /* MicroLytics */
  102. #define hidLS 4 /* LanSer Data */
  103. #define hidFO 5 /* Forma */
  104. #define hidIF 6 /* Informatic */
  105. #define hidAM 7 /* Amebis */
  106. #define hidDT 8 /* Datecs */
  107. #define hidFS 9 /* Filosoft */
  108. #define hidHS 10 /* HSoft */
  109. #define hidLI 11 /* Lingsoft */
  110. #define hidLO 12 /* Logos */
  111. #define hidMO 13 /* MorphoLogic */
  112. #define hidPL 14 /* Polderland */
  113. #define hidTI 15 /* TiP */
  114. /* Grammar Id Engine Defines */
  115. #define geidHM 1 /* Houghton-Mifflin */
  116. #define geidRF 2 /* Reference */
  117. #define geidES 3 /* Expert System */
  118. #define geidLD 4 /* Logidisque */
  119. #define geidSMK 5 /* Sumitomo Kinzoku (Japanese) */
  120. #define geidIF 6 /* Informatic */
  121. #define geidMO 7 /* MorphoLogic */
  122. #define geidMS 8 /* Microsoft Reserved */
  123. #define geidNO 9 /* Novell */
  124. #define geidCTI 10 /* CTI (Greek) */
  125. #define geidAME 11 /* Amebis (Solvenian) */
  126. #define geidTIP 12 /* TIP (Polish) */
  127. #endif /* VENDOR_H */
  128. // you may wish to include lid.h for some convenient langid defs
  129. #if !defined(lidUnknown)
  130. # define lidUnknown 0xffff
  131. #endif
  132. /*************************************************************
  133. PART 1 - Structure Defs
  134. **************************************************************/
  135. /* -------------- Common Section (Speller, Hyphenator, and Thesaurus) --------- */
  136. /* hardcoded ordinals are the exported dll entry points */
  137. // individual def files have these as well so be sure to change them
  138. // if you change these
  139. #define idllProofVersion 20
  140. #define idllProofInit 21
  141. #define idllProofTerminate 22
  142. #define idllProofOpenLex 23
  143. #define idllProofCloseLex 24
  144. #define idllProofSetOptions 25
  145. #define idllProofGetOptions 26
  146. typedef unsigned long PTEC; // ptec
  147. /******************* Proofing Tool Error Codes ************************/
  148. /* Major Error Codes in low two bytes (WORD) of PTEC */
  149. enum {
  150. ptecNoErrors,
  151. ptecOOM, /* memory error */
  152. ptecModuleError, /* Something wrong with parameters, or state of spell module. */
  153. ptecIOErrorMainLex, /* Read,write,or share error with Main Dictionary. */
  154. ptecIOErrorUserLex, /* Read,write,or share error with User Dictionary. */
  155. ptecNotSupported, /* No support for requested operation */
  156. ptecBufferTooSmall, /* Insufficient room for return info */
  157. ptecNotFound, /* Hyphenator and Thesaurus only */
  158. ptecModuleNotLoaded, /* underlying module not loaded (Glue Dll's) */
  159. };
  160. /* Minor Error Codes in high two bytes of PTEC */
  161. /* (Not set unless major code also set) */
  162. enum {
  163. ptecModuleAlreadyBusy=128, /* For non-reentrant code */
  164. ptecInvalidID, /* Not yet inited or already terminated.*/
  165. ptecInvalidWsc, /* Illegal values in WSC struct (speller only) */
  166. ptecInvalidMainLex, /* Mdr not registered with session */
  167. ptecInvalidUserLex, /* Udr not registered with session */
  168. ptecInvalidCmd, /* Command unknown */
  169. ptecInvalidFormat, /* Specified dictionary not correct format */
  170. ptecOperNotMatchedUserLex, /* Illegal operation for user dictionary type. */
  171. ptecFileRead, /* Generic read error */
  172. ptecFileWrite, /* Generic write error */
  173. ptecFileCreate, /* Generic create error */
  174. ptecFileShare, /* Generic share error */
  175. ptecModuleNotTerminated, /* Module not able to be terminated completely.*/
  176. ptecUserLexFull, /* Could not update Udr without exceeding limit.*/
  177. ptecInvalidEntry, /* invalid chars in string(s) */
  178. ptecEntryTooLong, /* Entry too long, or invalid chars in string(s) */
  179. ptecMainLexCountExceeded, /* Too many Mdr references */
  180. ptecUserLexCountExceeded, /* Too many udr references */
  181. ptecFileOpenError, /* Generic Open error */
  182. ptecFileTooLargeError, /* Generic file too large error */
  183. ptecUserLexReadOnly, /* Attempt to add to or write RO udr */
  184. ptecProtectModeOnly, /* (obsolete) */
  185. ptecInvalidLanguage, /* requested language not available */
  186. };
  187. #define ProofMajorErr(x) LOWORD(x)
  188. #define ProofMinorErr(x) HIWORD(x)
  189. /************* Structure def macros *************
  190. Smoke and mirrors to allow initialization of some members when
  191. using C++
  192. ***********************************/
  193. #if !defined(__cplusplus)
  194. # define STRUCTUREBEGIN(x) typedef struct {
  195. # define STRUCTUREEND0(x) } x;
  196. # define STRUCTUREEND1(x, y) } x;
  197. # define STRUCTUREEND2(x, y, z) } x;
  198. # define STRUCTUREEND3(x, y, z, w) } x;
  199. #else
  200. # define STRUCTUREBEGIN(x) struct x {
  201. # define STRUCTUREEND0(x) };
  202. # define STRUCTUREEND1(x, y) public: x() : y {} };
  203. # define STRUCTUREEND2(x, y, z) public: x() : y, z {} };
  204. # define STRUCTUREEND3(x, y, z, w) public: x() : y, z, w {} };
  205. #endif
  206. typedef DWORD PROOFVERNO; // version
  207. /* Proof Information Structure - return info from ToolVersion */
  208. STRUCTUREBEGIN(PROOFINFO) // info
  209. WCHAR *pwszCopyright; /* pointer to copyright buffer -
  210. can be NULL if size is zero */
  211. PROOFVERNO versionAPI; /* API */
  212. PROOFVERNO versionVendor; /* includes buildnumber */
  213. VENDORID vendorid; /* from vendor.h */
  214. /* size of copyright buffer in chars - client sets */
  215. DWORD cchCopyright; /* no error if too small or zero */
  216. DWORD xcap; /* tool dependent */
  217. STRUCTUREEND2(PROOFINFO, pwszCopyright(0), cchCopyright(0))
  218. /* xcap is the bitwise-or of */
  219. enum {
  220. xcapNULL = 0x00000000,
  221. xcapWildCardSupport = 0x00000001, // Speller only
  222. xcapMultiLexSupport = 0x00000002,
  223. xcapUserLexSupport = 0x00000008, // a must for spellers
  224. xcapLongDefSupport = 0x00000010, // Thesaurus only
  225. xcapExampleSentenceSupport = 0x00000020, // Thesaurus only
  226. xcapLemmaSupport = 0x00000040, // Thesaurus only
  227. xcapAnagramSupport = 0x00000100, // Speller only
  228. }; // xcap
  229. typedef void * PROOFLEX; // lex
  230. typedef enum {
  231. lxtChangeOnce=0,
  232. lxtChangeAlways,
  233. lxtUser,
  234. lxtExclude,
  235. lxtMain,
  236. lxtMax,
  237. lxtIgnoreAlways=lxtUser,
  238. } PROOFLEXTYPE; // lxt
  239. // note this API does not support external user dictionaries with
  240. // Change (lxtChangeAlways or lxtChangeOnce) properties
  241. // It does support either UserLex (the norm) or Exclude types
  242. // Opening a udr with type Exclude automatically makes it apply to
  243. // the entire session
  244. STRUCTUREBEGIN(PROOFLEXIN) /* Dictionary Input Info - lxin - all parameters in only */
  245. const WCHAR *pwszLex; // full path of dictionary to open
  246. BOOL fCreate; /* create if not already exist? (UDR's only) */
  247. PROOFLEXTYPE lxt; /* lxtMain, lxtUser, or lxtExclude (Speller UDR's only) */
  248. LANGID lidExpected; // expected LANGID of dictionary
  249. STRUCTUREEND3(PROOFLEXIN, lidExpected(lidUnknown), fCreate(TRUE), lxt(lxtMain))
  250. STRUCTUREBEGIN(PROOFLEXOUT) /* Dictionary Output Info - lxout */
  251. WCHAR *pwszCopyright; /* pointer to copyright buffer (MDR only)
  252. -- can be NULL if size (below) is zero -
  253. pointer is in, contents out */
  254. PROOFLEX lex; /* [out] id for use in subsequent calls */
  255. DWORD cchCopyright; /* [in] client sets - no error if too small or zero */
  256. PROOFVERNO version; /* [out] version of lexfile - includes buildnumber */
  257. BOOL fReadonly; /* [out] set if can't be written on */
  258. LANGID lid; /* [out] LANGID actually used */
  259. STRUCTUREEND2(PROOFLEXOUT, pwszCopyright(0), cchCopyright(0))
  260. typedef void *PROOFID; // id (or sid, hid, or tid)
  261. #define PROOFMAJORVERSION(x) (HIBYTE(HIWORD(x)))
  262. #define PROOFMINORVERSION(x) (LOBYTE(HIWORD(x)))
  263. #define PROOFMAJORMINORVERSION(x) (HIWORD(x))
  264. #define PROOFBUILDNO(x) (LOWORD(x))
  265. #define PROOFMAKEVERSION1(major, minor, buildno) (MAKELONG(buildno, MAKEWORD(minor, major)))
  266. #define PROOFMAKEVERSION(major, minor) PROOFMAKEVERSION1(major, minor, 0)
  267. #define PROOFTHISAPIVERSION PROOFMAKEVERSION(3, 0)
  268. STRUCTUREBEGIN(PROOFPARAMS) // xpar [in]
  269. DWORD versionAPI; // API version requested
  270. STRUCTUREEND1(PROOFPARAMS, versionAPI(PROOFTHISAPIVERSION))
  271. /*************************************************************
  272. PART 2 - Function Defs
  273. **************************************************************/
  274. #if defined(__cplusplus)
  275. extern "C" {
  276. #endif
  277. /* -------------- Common Section (Speller, Hyphenator, and Thesaurus) --------------
  278. the functions in this section are for documentation only -
  279. separate versions exist for each tool.
  280. ---------------------------------------------- */
  281. /****************************************************************
  282. *** PROOFVERSION
  283. This is the only routine that can be called outside of a session.
  284. ToolInit begins a session.
  285. The version numbers are in hex format with
  286. the high byte representing the major version number,
  287. the next byte the minor revision number, and the
  288. low order bytes represent an optional build number.
  289. For example, version 1.00 is 0x01000000. Version 2.13
  290. is 0x020d0000. Engines that support
  291. this API should return 0x03000000 for iAPIVersion.
  292. The engine ID identifies the core engine creator. The list
  293. in vendor.h identifies the possible values. For example,
  294. the Inso derived speller returns VendorIdInso. iVendorVersion
  295. is up to the vendor to manage and determine.
  296. This routine may return in xcap the functionality
  297. supported by the module. Since modules are usually
  298. dynamically linked, the application should read the
  299. information and verify that required functionality is
  300. present.
  301. Errors:
  302. ptecModuleError - bad memory (can't write on pinfo)
  303. **********************************/
  304. // PTEC WINAPI ToolVersion(ToolInfo *pInfo);
  305. typedef PTEC (WINAPI *PROOFVERSION) (PROOFINFO *pinfo);
  306. /***********************************************************
  307. *** ToolInit
  308. This is the entry point for a session. With the exception
  309. of ToolVersion, this routine must return successfully before
  310. use of any other routines. ToolInit initializes internal
  311. structures and resources needed for subsequent calls into the
  312. module. For example, SpellerInit initializes the UserLex,
  313. ChangeOnce, and ChangeAlways built-in UDR's. In general,
  314. modules allocate and free resources as needed, transparent to
  315. the application. pToolId is the handle to those variables.
  316. Modules store any data from the PROOFPARAMS structure internally
  317. and do not rely on the data in the structure remaining intact.
  318. Errors:
  319. ptecModuleError - bad memory (can't write on pxpar)
  320. ptecNotSupported - incompatible version
  321. ptecOOM - insufficient memory
  322. *****************************************/
  323. // PTEC WINAPI ToolInit(PROOFID *pToolid, const PROOFPARAMS *pxpar);
  324. typedef PTEC (WINAPI *PROOFINIT) (PROOFID *pid, const PROOFPARAMS *pxpar);
  325. /************************************************************
  326. *** ToolTerminate
  327. This function marks the end of the session. It attempts to
  328. close all dictionaries and free up any and all other resources
  329. allocated by the module since ToolInit.
  330. Do not call ToolTerminate if ToolInit was not successful.
  331. If fForce is TRUE, ToolTerminate is guaranteed to succeed. If
  332. fForce is false, it may fail. For example, there may be errors
  333. writing the user dictionaries out to disk. After ToolTerminate
  334. (whether it succeeds or fails), all other module routines with
  335. the exception of ToolTerminate and ToolVersion are unusable
  336. until the module is successfully reinitialized using ToolInit.
  337. If this call fails, successful re-initialization of the module
  338. is not guaranteed on all platforms. In addition, failure to
  339. successfully terminate each session may lock memory and file
  340. resources in an unrecoverable way until terminate is successful.
  341. If the terminate call fails, the main application should either
  342. fix the problem (e.g., insert floppy in drive) and try to
  343. terminate again, or should terminate using the fForce flag
  344. switch.
  345. Errors:
  346. ptecModuleError, ptecInvalidID - id is illegal
  347. ***********************************************/
  348. // PTEC WINAPI ToolTerminate(PROOFID id, BOOL fForce);
  349. typedef PTEC (WINAPI *PROOFTERMINATE) (PROOFID id, BOOL fForce);
  350. /*****************************************************************
  351. *** ToolSetOptions
  352. Set the value of an option for a tool. The value to set is in iOptVal.
  353. Errors:
  354. ptecModuleError, ptecInvalidID - id is illegal
  355. ptecNotSupported - iOptionSelect unknown
  356. ********************************************/
  357. // PTEC WINAPI ToolSetOptions(PROOFID id, int iOptionSelect, int iOptVal);
  358. typedef PTEC (WINAPI *PROOFSETOPTIONS) (PROOFID id, DWORD iOptionSelect, const DWORD iOptVal);
  359. /*****************************************************************
  360. *** ToolGetOptions
  361. Get the current value of an option from a tool. Returns in *piOptVal;
  362. Errors:
  363. ptecModuleError, ptecInvalidID - id is illegal
  364. ptecModuleError - can't write at piOptVal
  365. ptecNotSupported - iOptionSelect unknown
  366. ********************************************/
  367. // PTEC WINAPI ToolGetOptions(PROOFID id, int iOptionSelect, int *piOptVal);
  368. typedef PTEC (WINAPI *PROOFGETOPTIONS) (PROOFID id, DWORD iOptionSelect, DWORD *piOptVal);
  369. /*****************************************************************
  370. *** ToolOpenLex
  371. The dictionary file (main or user) is opened and verified, but not
  372. necessarily loaded.
  373. Errors:
  374. ptecModuleError, ptecInvalidID - id is illegal
  375. ptecModuleError - memory error
  376. ptecIOErrorMainLex - Can't open or read Main Lex
  377. ptecIOErrorMainLex, ptecInvalidFormat
  378. ptecIOErrorMainLex, ptecInvalidLanguage - requested LANGID not in this lex
  379. ptecOOM
  380. ptecIOErrorUserLex, ptecUserLexCountExceeded - second exclusion dictionary
  381. - too many Udrs
  382. ptecIOErrorUserLex, ptecFileOpenError
  383. ptecIOErrorUserLex, ptecFileCreate - couldn't create a UDR
  384. ptecIOErrorUserLex, ptecFileRead
  385. ptecIOErrorUserLex, ptecInvalidFormat
  386. ********************************************/
  387. // PTEC WINAPI ToolOpenLex(PROOFID id, const PROOFLEXIN *plxin, PROOFLEXOUT *plxout);
  388. typedef PTEC (WINAPI *PROOFOPENLEX) (PROOFID id, const PROOFLEXIN *plxin, PROOFLEXOUT *plxout);
  389. /*****************************************************************
  390. *** ToolCloseLex
  391. Closes the specified dictionary and disassociates that dictionary
  392. from any subsequent checks. In the case of user dictionaries,
  393. updates the disk file (if any). If the dictionary file cannot
  394. be updated, the call fails unless the fForce parameter is also set.
  395. If fForce is true, ToolCloseLex is guaranteed to successfully
  396. remove the dictionary from the dictionary list and effectively
  397. close the file. In this case, it the file could not be updated,
  398. the changes are lost, but the function is considered successful,
  399. and therefore returns ptecNOERRORS.
  400. Errors:
  401. ptecModuleError, ptecInvalidID - id is illegal
  402. ptecModuleError, ptecInvalidMainLex - lex is illegal
  403. ptecIOErrorUserLex, ptecFileWrite
  404. ptecIOErrorUserLex, ptecOperNotMatchedUserLex - can't close a built-in UDR
  405. // PTEC WINAPI ToolCloseLex(PROOFID id, PROOFLEX dict, BOOL fforce);
  406. *****************************/
  407. typedef PTEC (WINAPI *PROOFCLOSELEX) (PROOFID id, PROOFLEX lex, BOOL fforce);
  408. // fForce forces closing the specified user dictionary, even if the
  409. // dictionary cannot be updated. Has no meaning for main
  410. // dictionaries.
  411. /******************************** Special Glue DLL API ******************
  412. For the glue dll's (converts the API for clients to tools that use API v1 for
  413. speller, hyphenator, v2 for thesaurus), we need to set the name of the previous version
  414. DLL to use - and the code page (that it can't figure out from the LANGID)
  415. to use for any data conversion.
  416. The glue dll's use the lid to set the code page for data conversion.
  417. BOOL WINAPI ToolSetDllName(const WCHAR *pwszDllName, const UINT uCodePage);
  418. *************************************************************************/
  419. #define idllProofSetDllName 19
  420. typedef BOOL (WINAPI *PROOFSETDLLNAME)(const WCHAR *pwszDllName, const UINT uCodePage);
  421. #if defined(__cplusplus)
  422. }
  423. #endif
  424. #pragma pack(pop, proofapi_h) // restore to whatever was before
  425. #endif // PROOFBASE_H