Gets a table cookie for the specified code page.
#include <unilib.h> int UniGetTable ( int codePage, UniRuleTable_t *table);
(IN) Specifies which code page to obtain a translation table for. Pass in the number of the code page. For a list of supported code pages, see Section 12.1, Supported Code Pages.
(OUT) Points to the cookie for the translation table or to -1 (UNI_LOCAL_DEFAULT) if an unsupported code page is passed in the codePage parameter.
If successful, returns 0. Otherwise, returns a negative error code and the value of table is undefined.
A component, service, or application must explicitly request that a table be loaded and pass the cookie associated with that table to functions requiring table information to perform their task. Table cookies are obtained by calling UniGetTable. The corresponding call to dispose of these tables is UniDisposeTable.
The table files are located in an nls subdirectory of the one where server.exe was installed. If the UniGetTable function yields I/O errors when opening a previously unused code page table for reading, the most likely reason is that the file is absent or corrupted. The name of the file corresponds closely with the value passed in codepage parameter.
NOTE:The default translation table for the host's local code page is always loaded and available. This can be obtained by passing UNI_LOCAL_DEFAULT in place of table to any function requiring it.
For sample code, see UniLib.c.