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.

157 lines
6.2 KiB

  1. // -----------------------------------------------------------------------------
  2. // macdupls.h
  3. //
  4. // This file is used to map functions to Macintosh specific implementations.
  5. //
  6. // Brian A. Moore - 4/28/97
  7. // -----------------------------------------------------------------------------
  8. #ifndef _MACDUPLS_H
  9. #define _MACDUPLS_H
  10. #ifdef MAC
  11. // Need to make these functions unique
  12. #define DebugStrf Athena_DebugStrf
  13. #define AssertSzFn Athena_AssertSzFn
  14. #define DllCanUnloadNow Athena_DllCanUnloadNow
  15. #define HinstDll CryptDlg_HinstDll
  16. // for functions in IMNXPORT.LIB
  17. #define SzGetLocalPackedIP Mac_SzGetLocalPackedIP
  18. #define SzGetLocalHostNameForID Mac_SzGetLocalHostNameForID
  19. #define SzGetLocalHostName Mac_SzGetLocalHostNameForID
  20. // for some functions that are duplicated in Capone
  21. #define MakeFileName Athena_MakeFileName
  22. #define StripUndesirables Athena_StripUndesirables
  23. // These are needed only for MLANG support and
  24. // can be removed when MLANG is brought online.
  25. typedef HRESULT (*PFMAC_BreakLineA)(LCID, UINT, const CHAR*, long, long, long*, long*);
  26. typedef HRESULT (*PFMAC_BreakLineW)(LCID, const WCHAR*, long, long, long*, long*);
  27. HRESULT MAC_BreakLineA(LCID locale, UINT uCodePage, const CHAR* pszSrc, long cchSrc,
  28. long cMaxColumns, long* pcchLine, long* pcchSkip);
  29. HRESULT MAC_BreakLineW(LCID locale, const WCHAR* pszSrc, long cchSrc,
  30. long cMaxColumns, long* pcchLine, long* pcchSkip);
  31. typedef struct _MAC_LineBreakConsole
  32. {
  33. PFMAC_BreakLineA BreakLineA;
  34. PFMAC_BreakLineW BreakLineW;
  35. } MAC_LineBreakConsole, * PMAC_LineBreakConsole;
  36. STDAPI MAC_IsConvertINetStringAvailable(DWORD dwSrcEncoding, DWORD dwDstEncoding);
  37. #define IsConvertINetStringAvailable MAC_IsConvertINetStringAvailable
  38. STDAPI MAC_ConvertINetString(LPDWORD lpdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding,
  39. LPCSTR lpSrcStr, LPINT lpnSrcSize, LPSTR lpDstStr, LPINT lpnDstSize);
  40. #define ConvertINetString MAC_ConvertINetString
  41. // for inetcomm\mimeole\vstream.cpp
  42. #define VirtualAlloc(_a, _b, _c, _d) malloc(_b)
  43. #define VirtualFree(_a, _b, _c) free(_a)
  44. // for lack of CoRegisterClassObject support
  45. #undef CoCreateInstance
  46. STDAPI Athena_CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwContext,
  47. REFIID iid, LPVOID * ppv);
  48. #define CoCreateInstance Athena_CoCreateInstance
  49. STDAPI Ares_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
  50. STDAPI Athena_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
  51. #define DllGetClassObject Athena_DllGetClassObject
  52. #include <mapinls.h>
  53. // For WinNLS support
  54. #ifndef MB_PRECOMPOSED
  55. #define MB_PRECOMPOSED 0x00000001 /* use precomposed chars */
  56. #endif // !MB_PRECOMPOSED
  57. EXTERN_C BOOL WINAPI MNLS_IsValidCodePage(UINT uiCodePage);
  58. #define IsValidCodePage MNLS_IsValidCodePage
  59. EXTERN_C BOOL WINAPI MNLS_IsDBCSLeadByteEx(UINT uiCodePage, BYTE TestChar);
  60. #define IsDBCSLeadByteEx MNLS_IsDBCSLeadByteEx
  61. #define IsDBCSLeadByte(_a) MNLS_IsDBCSLeadByteEx(CP_ACP, (_a))
  62. EXTERN_C int WINAPI MAC_MultiByteToWideChar(UINT uCodePage, DWORD dwFlags,
  63. LPCSTR lpMultiByteStr, int cchMultiByte,
  64. LPWSTR lpWideCharStr, int cchWideChar);
  65. #undef MultiByteToWideChar
  66. #define MultiByteToWideChar MAC_MultiByteToWideChar
  67. EXTERN_C int WINAPI MAC_WideCharToMultiByte(UINT uCodePage, DWORD dwFlags,
  68. LPCWSTR lpWideCharStr, int cchWideChar,
  69. LPSTR lpMultiByteStr, int cchMultiByte,
  70. LPCSTR lpDefaultChar, BOOL FAR *lpfUsedDefaultChar);
  71. #undef WideCharToMultiByte
  72. #define WideCharToMultiByte MAC_WideCharToMultiByte
  73. // For inetcomm\mapimime\cpropv.cpp
  74. #define X_lstrcmpW lstrcmpW
  75. // For inetcomm\mapimime\mapimime.cpp
  76. #define CharNextExA(_a, _b, _c) CharNext((_b))
  77. #define CharPrevExA(_a, _b, _c, _d) CharPrev((_b), (_c))
  78. // For cryptdlg/select.cpp
  79. STDAPI_(LPWSTR) PszDupW(LPCWSTR pcwszSource);
  80. STDAPI_(int) MNLS_lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2);
  81. #define wcslen(_a) ((size_t)lstrlenW(_a))
  82. #define _wcsdup PszDupW
  83. #define wcscmp MNLS_lstrcmpW
  84. wchar_t * __cdecl WchCryptDlgWcsStr (const wchar_t * wcs1, const wchar_t * wcs2);
  85. #define wcsstr WchCryptDlgWcsStr
  86. // For _splitpath support
  87. #ifndef _MAX_EXT
  88. #define _MAX_EXT 256
  89. #endif // !_MAX_EXT
  90. // WinHelp patch
  91. EXTERN_C BOOL ExchWinHelp(HWND hwndMain, LPCSTR szHelp, UINT uCommand, DWORD dwData);
  92. #define WinHelpA ExchWinHelp
  93. #undef WinHelp
  94. #define WinHelp ExchWinHelp
  95. // More support for SHLWAPI.H
  96. STDAPI_(LPSTR) MAC_PathFindExtension(LPCSTR pszPath);
  97. STDAPI_(LPSTR) MAC_PathFindFileName(LPCSTR pszPath);
  98. STDAPI_(LPSTR) MAC_StrFormatByteSize(DWORD dw, LPSTR szBuf, UINT uiBufSize);
  99. STDAPI_(LPSTR) Mac_StrStrIA(LPCSTR lpFirst, LPCSTR lpSrch);
  100. STDAPI_(LPSTR) PszDupA(LPCSTR pcszSource);
  101. STDAPI MAC_UrlUnescapeA(LPSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, DWORD dwFlags);
  102. #define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000
  103. #define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO
  104. #define URL_BROWSER_MODE URL_DONT_ESCAPE_EXTRA_INFO
  105. #define URL_UNESCAPE_INPLACE 0x00100000
  106. #define StrChr strchr
  107. #define StrChrA strchr
  108. #define StrDupA PszDupA
  109. #define StrToInt atoi
  110. #define StrCmpNI _strnicmp
  111. #define StrCmpN strncmp
  112. #define StrStr strstr
  113. #define StrStrI Mac_StrStrIA
  114. #define StrFormatByteSize MAC_StrFormatByteSize
  115. #define PathFindExtension MAC_PathFindExtension
  116. #define PathFindFileName MAC_PathFindFileName
  117. #define UrlUnescapeA MAC_UrlUnescapeA
  118. // Support for URLMON.H
  119. STDAPI MAC_CoInternetCombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags,
  120. LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved);
  121. #define CoInternetCombineUrl MAC_CoInternetCombineUrl
  122. // These are for functions in MSOERT
  123. #define CchFileTimeToDateTimeSz MAC_CchFileTimeToDateTimeSz
  124. // For _int64 support with LARGE_INTEGER
  125. #define QuadPart BuildBreak
  126. #endif // MAC
  127. #endif // !_MACDUPLS_H