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