home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / trnsdt.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  3.0 KB  |  93 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  2. /************************************************************************/
  3. /*                                    */
  4. /*    Header File:    Trnsdt.hüiDOS LIB + Windows DLL/Win16 & Win32)    */
  5. /*                                    */
  6. /*    (C) Copyright Microsoft Corporation 1993-1996            */
  7. /*                                    */
  8. /************************************************************************/
  9. #if defined(WIN32)
  10. #pragma    pack(4)
  11. #endif
  12. /****************************************************************************
  13.     Definitions for MS-DOS
  14. *****************************************************************************/
  15. #if (!defined(WINDOWS) && !defined(WIN32))
  16. #define    FALSE        0
  17. #define    TRUE        1
  18. #define FAR        _far
  19. #define VOID        void
  20. typedef    unsigned char    BYTE;
  21. typedef BYTE FAR*    LPBYTE;
  22. typedef    unsigned short    WORD;
  23. typedef    unsigned long    DWORD;
  24. #endif
  25.  
  26. /****************************************************************************
  27.     PASSSTRUCT Structure
  28. *****************************************************************************/
  29. typedef    struct    tagPassParm  {
  30.     WORD    parm_length;        /* Parameter Length(input)    */
  31.     WORD    exit_code;        /* Exit Code(output)        */
  32.     WORD    in_length;        /* Input Buffer Length(input)    */
  33.     LPBYTE    in_addr;        /* Input Buffer Address(input)    */
  34.     WORD    out_length;        /* Output Buffer Length(in/out)    */
  35.     LPBYTE    out_addr;        /* Output Buffer Address(input)    */
  36.     WORD    trns_id;        /* Conversion ID(input)        */
  37.     WORD    in_page;        /* Input Code Page(input)    */
  38.     WORD    out_page;        /* Output Code Page         */
  39.     WORD    option;            /* Option(at calling)        */
  40.     WORD    type;           /* DBCS, EITHER, BOTH       */
  41. }    PASSSTRUCT;
  42.  
  43. /****************************************************************************
  44.     Function declarations
  45. *****************************************************************************/
  46. #if defined(__cplusplus)
  47. extern "C" {
  48. #endif
  49. #if (!defined(WINDOWS) && !defined(WIN32))
  50. WORD TrnsDt(PASSSTRUCT * PassParm);
  51. #else
  52. WORD WINAPI TrnsDt(PASSSTRUCT far* PassParm);
  53. #endif
  54. #if defined(__cplusplus)
  55. }
  56. #endif
  57.  
  58. /****************************************************************************
  59.     Return Codes
  60. *****************************************************************************/
  61. #define    NO_ERR            0
  62. #define    ERR_FILE_NOT_FOUND    2
  63. #define    ERR_INVALID_PARAMETER    87
  64. #define    ERR_BUFFER_OVERFLOW    111
  65. #define    ERR_MEMORY_ALLOCATE    150
  66.  
  67. /****************************************************************************
  68.     Type codes
  69. *****************************************************************************/
  70.  
  71. #define SNA_DBCS        0x0100
  72. #define SNA_EITHER      0x0200
  73. #define SNA_BOTH        0x0400
  74.  
  75. /****************************************************************************
  76.     Option bitmasks
  77. *****************************************************************************/
  78.  
  79. #define    OP_GET_SOSI     0x0001
  80. #define    OP_DB_START     0x0002
  81. #define    OP_IBM_TABLE    0x0004
  82. #define OP_BLANK_PAD    0x0008
  83. #define OP_TRUNCATE     0x0010
  84. #define OP_OMITNULL     0x0020
  85.  
  86. #define    OP_SET_SOSI        0x0100
  87.  
  88. #if defined(WIN32)
  89. #pragma    pack()
  90. #endif
  91.  
  92. #pragma option pop /*P_O_Pop*/
  93.