home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / mapinls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  6.8 KB  |  214 lines

  1. /*
  2.  *  M A P I N L S . H
  3.  *
  4.  *  Internationalization Support Utilities
  5.  *
  6.  *  Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
  7.  */
  8.  
  9. #ifndef _MAPINLS_H_
  10. #define _MAPINLS_H_
  11. #pragma option push -b
  12.  
  13.  
  14. #if defined (WIN32) && !defined (_WIN32)
  15. #define _WIN32
  16. #endif
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /* We don't want to include windows.h in case that conflicts with an */
  23. /* earlier inclusion of compobj.h */
  24.  
  25. #if !defined(WINAPI)
  26.     #if defined(_WIN32) && (_MSC_VER >= 800)
  27.         #define WINAPI              __stdcall
  28.     #elif defined(WIN16)
  29.         #define WINAPI              _far _pascal
  30.     #else
  31.         #define WINAPI              _far _pascal
  32.     #endif
  33. #endif
  34.  
  35. #if defined(DOS) || defined(_MAC)
  36.  
  37. #include <string.h>
  38.  
  39. #endif
  40.  
  41. #ifndef FAR
  42. #define FAR
  43. #endif
  44.  
  45. typedef unsigned char                   BYTE;
  46. typedef unsigned short                  WORD;
  47. typedef unsigned long                   DWORD;
  48. typedef unsigned int                    UINT;
  49. typedef int                             BOOL;
  50.  
  51. #ifndef __CHAR_DEFINED__
  52. typedef char                            CHAR;
  53. #endif
  54.  
  55. #ifdef UNICODE
  56. typedef WCHAR                           TCHAR;
  57. #else
  58. typedef char                            TCHAR;
  59. #endif
  60.  
  61. typedef unsigned short                  WCHAR;
  62. typedef WCHAR FAR *                     LPWSTR;
  63. typedef const WCHAR FAR *               LPCWSTR;
  64. typedef CHAR FAR *                      LPSTR;
  65. typedef const CHAR FAR *                LPCSTR;
  66. typedef TCHAR FAR *                     LPTSTR;
  67. typedef const TCHAR FAR *               LPCTSTR;
  68. typedef DWORD                           LCID;
  69. typedef const void FAR *                LPCVOID;
  70.  
  71. #ifndef _MAC
  72. #ifndef LPOLESTR
  73. #if !defined (_WIN32)
  74.  
  75. #define LPOLESTR        LPSTR
  76. #define LPCOLESTR       LPCSTR
  77. #define OLECHAR         char
  78. #define OLESTR(str)     str
  79.  
  80. #else  /* Win32 */
  81.  
  82. #define LPOLESTR        LPWSTR
  83. #define LPCOLESTR       LPCWSTR
  84. #define OLECHAR         WCHAR
  85. #define OLESTR(str)     L##str
  86.  
  87. #endif /* !_WIN32 */
  88. #endif /* LPOLESTR */
  89. #endif /* _MAC */
  90.  
  91. #define NORM_IGNORECASE                 0x00000001     /* ignore case */
  92. #define NORM_IGNORENONSPACE             0x00000002     /* ignore diacritics */
  93. #define NORM_IGNORESYMBOLS              0x00000004     /* ignore symbols */
  94.  
  95. #if defined (_WIN32) /* from winnls.h */
  96. #define NORM_IGNOREKANATYPE             0x00010000     /* ignore kanatype */
  97. #define NORM_IGNOREWIDTH                0x00020000     /* ignore width */
  98. #elif defined (WIN16) /* from olenls.h */
  99. #define NORM_IGNOREWIDTH                0x00000008      /* ignore width */
  100. #define NORM_IGNOREKANATYPE             0x00000040      /* ignore kanatype */
  101. #endif
  102.  
  103. #if defined(WIN16)
  104.  
  105. #define lstrcpyA                        lstrcpy
  106. #define lstrlenA                        lstrlen
  107. #define lstrcmpA                        lstrcmp
  108. #define lstrcmpiA                       lstrcmpi
  109. #define LoadStringA                     LoadString
  110. #define IsBadStringPtrA(a1, a2)         IsBadStringPtr(a1, a2)
  111. #define wvsprintfA                      wvsprintf
  112. #define MessageBoxA                     MessageBox
  113. #define GetModuleHandleA                GetModuleHandle
  114. #define CreateWindowA                   CreateWindow
  115. #define RegisterClassA                  RegisterClass
  116. #define CharToOemBuff                   AnsiToOemBuff
  117. #define CharToOem                       AnsiToOem
  118. #define CharUpperBuff                   AnsiUpperBuff
  119. #define CharUpper                       AnsiUpper
  120.  
  121. #elif defined(DOS) || defined(_MAC)
  122.  
  123. #define IsBadReadPtr(lp, cb)            (FALSE)
  124. #define IsBadWritePtr(lp, cb)           (FALSE)
  125. #define IsBadHugeReadPtr(lp, cb)        (FALSE)
  126. #define IsBadHugeWritePtr(lp, cb)       (FALSE)
  127. #define IsBadCodePtr(lpfn)              (FALSE)
  128. #ifdef _MAC
  129. #undef IsBadStringPtr
  130. #endif
  131. #define IsBadStringPtr(lpsz, cchMax)    (FALSE)
  132. #define IsBadStringPtrA(lpsz, cchMax)   (FALSE)
  133.  
  134. #if defined(DOS)
  135.  
  136. #define lstrcpyA                        strcpy
  137. #define lstrlenA                        strlen
  138. #define lstrcmpA                        strcmp
  139. #define lstrcmp                         strcmp
  140. #define lstrcmpi                        strcmpi
  141. #define lstrcpy                         strcpy
  142. #define lstrcat                         strcat
  143. #define lstrlen                         strlen
  144. #define wsprintf                        sprintf
  145.  
  146. #endif
  147. #endif
  148.  
  149. #if defined(DOS) || defined(WIN16)
  150. /* Simulate effect of afx header */
  151. #define __T(x)      x
  152. #define _T(x)       __T(x)
  153. #define TEXT        _T
  154. #endif
  155.  
  156. #define CP_ACP      0       /* default to ANSI code page */
  157. #define CP_OEMCP    1       /* default to OEM  code page */
  158.  
  159. LCID    WINAPI  MNLS_GetUserDefaultLCID(void);
  160. UINT    WINAPI  MNLS_GetACP(void);
  161. int     WINAPI  MNLS_CompareStringA(LCID Locale, DWORD dwCmpFlags,
  162.                     LPCSTR lpString1, int cchCount1, LPCSTR lpString2,
  163.                     int cchCount2);
  164. int     WINAPI  MNLS_CompareStringW(LCID Locale, DWORD dwCmpFlags,
  165.                     LPCWSTR lpString1, int cchCount1, LPCWSTR lpString2,
  166.                     int cchCount2);
  167. int     WINAPI  MNLS_MultiByteToWideChar(UINT uCodePage, DWORD dwFlags,
  168.                     LPCSTR lpMultiByteStr, int cchMultiByte,
  169.                     LPWSTR lpWideCharStr, int cchWideChar);
  170. int     WINAPI  MNLS_WideCharToMultiByte(UINT uCodePage, DWORD dwFlags,
  171.                     LPCWSTR lpWideCharStr, int cchWideChar,
  172.                     LPSTR lpMultiByteStr, int cchMultiByte,
  173.                     LPCSTR lpDefaultChar, BOOL FAR *lpfUsedDefaultChar);
  174. int     WINAPI  MNLS_lstrlenW(LPCWSTR lpString);
  175. int     WINAPI  MNLS_lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2);
  176. LPWSTR  WINAPI  MNLS_lstrcpyW(LPWSTR lpString1, LPCWSTR lpString2);
  177. BOOL    WINAPI  MNLS_IsBadStringPtrW(LPCWSTR lpsz, UINT ucchMax);
  178.  
  179. #if defined(_WIN32) && !defined(_WINNT) && !defined(_WIN95) && !defined(_MAC)
  180. #define _WINNT
  181. #endif
  182.  
  183. #if !defined(_WINNT) && !defined(_WIN95)
  184. #define GetUserDefaultLCID      MNLS_GetUserDefaultLCID
  185. #define GetACP                  MNLS_GetACP
  186. #define MultiByteToWideChar     MNLS_MultiByteToWideChar
  187. #define WideCharToMultiByte     MNLS_WideCharToMultiByte
  188. #define CompareStringA          MNLS_CompareStringA
  189. #endif
  190.  
  191. #if !defined(MAPI_NOWIDECHAR)
  192.  
  193. #define lstrlenW                MNLS_lstrlenW
  194. #define lstrcmpW                MNLS_lstrcmpW
  195. #define lstrcpyW                MNLS_lstrcpyW
  196. #define CompareStringW          MNLS_CompareStringW
  197.  
  198. #if defined(WIN16) || defined(_WINNT) || defined(_WIN95)
  199. #define IsBadStringPtrW         MNLS_IsBadStringPtrW
  200. #elif defined(_MAC)
  201. #define IsBadStringPtrW(lpsz, cchMax)           (FALSE)
  202. #else
  203. #define IsBadStringPtrW         (FALSE)
  204. #endif
  205.  
  206. #endif  /* ! MAPI_NOWIDECHAR */
  207.  
  208. #ifdef __cplusplus
  209. }
  210. #endif
  211.  
  212. #pragma option pop
  213. #endif /* _MAPINLS_H_ */
  214.