Leaked source code of windows server 2003
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.

188 lines
5.8 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // intl.h - interface for internationalization functions in intl.c
  24. ////
  25. #ifndef __INTL_H__
  26. #define __INTL_H__
  27. #include "winlocal.h"
  28. #define INTL_VERSION 0x00000106
  29. // intl engine handle
  30. //
  31. DECLARE_HANDLE32(HINTL);
  32. // dwFlag defines for IntlDateGetText
  33. //
  34. #define INTL_NOYEAR 0x00000001
  35. // dwFlag defines for IntlTimeGetText
  36. //
  37. #define INTL_NOSECOND 0x00000020
  38. #define INTL_NOAMPM 0x00000040
  39. #define INTL_NOAMPMSEPARATOR 0x00000080
  40. // dwFlag defines for IntlTimeSpanGetText
  41. //
  42. #define INTL_HOURS_LZ 0x00001000
  43. #define INTL_MINUTES_LZ 0x00002000
  44. #define INTL_SECONDS_LZ 0x00004000
  45. // values returned in iDate field of INTLDATE struct
  46. //
  47. #define IDATE_MDY 0
  48. #define IDATE_DMY 1
  49. #define IDATE_YMD 2
  50. // values returned in iTime field of INTLTIME struct
  51. //
  52. #define ITIME_12 0
  53. #define ITIME_24 1
  54. // structure passed to IntlDateGetFormat
  55. //
  56. typedef struct INTLDATEFORMAT
  57. {
  58. TCHAR szShortDate[32];
  59. TCHAR szDateSep[32];
  60. int iDate;
  61. BOOL fYearCentury;
  62. BOOL fMonthLeadingZero;
  63. BOOL fDayLeadingZero;
  64. DWORD dwReserved;
  65. } INTLDATEFORMAT, FAR *LPINTLDATEFORMAT;
  66. // structure passed to IntlTimeGetFormat
  67. //
  68. typedef struct INTLTIMEFORMAT
  69. {
  70. TCHAR szTimeSep[32];
  71. TCHAR szAMPMSep[32];
  72. TCHAR szAM[32];
  73. TCHAR szPM[32];
  74. int iTime;
  75. BOOL fHourLeadingZero;
  76. BOOL fMinuteLeadingZero;
  77. BOOL fSecondLeadingZero;
  78. DWORD dwReserved;
  79. } INTLTIMEFORMAT, FAR *LPINTLTIMEFORMAT;
  80. #ifdef __cplusplus
  81. extern "C" {
  82. #endif
  83. // IntlInit - initialize intl engine
  84. // <dwVersion> (i) must be INTL_VERSION
  85. // <hInst> (i) instance handle of calling module
  86. // return handle (NULL if error)
  87. //
  88. HINTL DLLEXPORT WINAPI IntlInit(DWORD dwVersion, HINSTANCE hInst);
  89. // IntlTerm - shut down intl engine
  90. // <hIntl> (i) handle returned from IntlInit
  91. // return 0 if success
  92. //
  93. int DLLEXPORT WINAPI IntlTerm(HINTL hIntl);
  94. // IntlDateGetText - construct date text based on <y>, <m>, <d>
  95. // <hIntl> (i) handle returned from IntlInit
  96. // <y> (i) year
  97. // <m> (i) month
  98. // <d> (i) day
  99. // <lpszText> (o) buffer to copy date text
  100. // <sizText> (i) size of buffer
  101. // <dwFlags> (i) option flags
  102. // INTL_NOYEAR do not include year in text output
  103. // return 0 if success
  104. //
  105. int DLLEXPORT WINAPI IntlDateGetText(HINTL hIntl, int y, int m, int d, LPTSTR lpszText, size_t sizText, DWORD dwFlags);
  106. // IntlTimeGetText - construct time text based on <h>, <m>, <s>
  107. // <hIntl> (i) handle returned from IntlInit
  108. // <h> (i) hour
  109. // <m> (i) minute
  110. // <s> (i) second
  111. // <lpszText> (o) buffer to copy time text
  112. // <sizText> (i) size of buffer
  113. // <dwFlags> (i) option flags
  114. // INTL_NOSECOND do not include second in text output
  115. // INTL_NOAMPM do not include am or pm in text output
  116. // INTL_NOAMPMSEPARATOR do not include space between time and am/pm
  117. // return 0 if success
  118. //
  119. int DLLEXPORT WINAPI IntlTimeGetText(HINTL hIntl, int h, int m, int s, LPTSTR lpszText, size_t sizText, DWORD dwFlags);
  120. // IntlTimeSpanGetText - construct time span text based on <ms>
  121. // <hIntl> (i) handle returned from IntlInit
  122. // <ms> (i) milleseconds
  123. // <nDecimalPlaces> (i) 0, 1, 2, or 3 decimal places for fraction
  124. // <lpszText> (o) buffer to copy time span text
  125. // <sizText> (i) size of buffer
  126. // <dwFlags> (i) option flags
  127. // INTL_HOURS_LZ include hours, even if zero
  128. // INTL_MINUTES_LZ include minutes, even if zero
  129. // INTL_SECONDS_LZ include seconds, even if zero
  130. //
  131. // NOTE: below are some examples
  132. //
  133. // dwFlags ms=7299650 ms=1234 ms=0
  134. // --------------------------------------------------------
  135. // 0 "2:01:39.650" "1.234" "0"
  136. // INTL_HOURS_LZ "2:01:39.650" "0:00:01.234" "0:00:00.000"
  137. // INTL_MINUTES_LZ "2:01:39.650" "0:01.234" "0:00.000"
  138. // INTL_SECONDS_LZ "2:01:39.650" "1.234" "0.000"
  139. //
  140. // dwFlags ms=7299650 ms=1234 ms=0
  141. // --------------------------------------------------------
  142. // 3 "2:01:39.650" "1.234" ".000"
  143. // 2 "2:01:39.65" "1.23" ".00"
  144. // 1 "2:01:39.7" "1.2" ".0"
  145. // 0 "2:01:39" "1" "0"
  146. //
  147. // return 0 if success
  148. //
  149. int DLLEXPORT WINAPI IntlTimeSpanGetText(HINTL hIntl, DWORD ms,
  150. int nDecimalPlaces, LPTSTR lpszText, size_t sizText, DWORD dwFlags);
  151. // IntlDateGetFormat - return current date format structure
  152. // <hIntl> (i) handle returned from IntlInit
  153. // <lpIntlDateFormat> (o) copy date format structure here
  154. // return 0 if success
  155. //
  156. int DLLEXPORT WINAPI IntlDateGetFormat(HINTL hIntl, LPINTLDATEFORMAT lpIntlDateFormat);
  157. // IntlTimeGetFormat - return current time format structure
  158. // <hIntl> (i) handle returned from IntlInit
  159. // <lpIntlTimeFormat> (o) copy time format structure here
  160. // return 0 if success
  161. //
  162. int DLLEXPORT WINAPI IntlTimeGetFormat(HINTL hIntl, LPINTLTIMEFORMAT lpIntlTimeFormat);
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166. #endif // __INTL_H__