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.

110 lines
3.2 KiB

  1. /*
  2. * AR: Varma: REVIEW:
  3. * File contains wrappers for few symbols in shlwapi.src, that were exported
  4. * as an alias to other symbols. Chose wrappers instead of macros as they are
  5. * exported as an alias.
  6. */
  7. #include "priv.h"
  8. BOOL IntlStrEqWorkerA(BOOL fCaseSens, LPCSTR lpString1, LPCSTR lpString2, int nChar) {
  9. return StrIsIntlEqualA(fCaseSens, lpString1, lpString2, nChar);
  10. }
  11. BOOL IntlStrEqWorkerW(BOOL fCaseSens, LPCWSTR lpString1, LPCWSTR lpString2, int nChar) {
  12. return StrIsIntlEqualW(fCaseSens, lpString1, lpString2, nChar);
  13. }
  14. STDAPI_(DWORD) SHDeleteOrphanKeyA( IN HKEY hkey, IN LPCSTR pszSubKey)
  15. {
  16. return SHDeleteEmptyKeyA( hkey, pszSubKey );
  17. }
  18. STDAPI_(DWORD) SHDeleteOrphanKeyW( IN HKEY hkey, IN LPCWSTR pszSubKey)
  19. {
  20. return SHDeleteEmptyKeyW( hkey, pszSubKey );
  21. }
  22. STDAPI_(BOOL) IsCharAlphaW(WCHAR wch) { return IsCharAlphaWrap(wch); }
  23. STDAPI_(BOOL) IsCharAlphaNumericW(WCHAR wch) { return IsCharAlphaNumericWrap(wch); }
  24. STDAPI_(BOOL) IsCharUpperW(WCHAR wch) { return IsCharUpperWrap(wch); }
  25. STDAPI_(BOOL) IsCharLowerW(WCHAR wch) { return IsCharLowerWrap(wch); }
  26. EXTERN_C HANDLE MapHandle(HANDLE hData, DWORD dwSource, DWORD dwDest, DWORD dwDesiredAccess, DWORD dwFlags)
  27. {
  28. return SHMapHandle( hData, dwSource, dwDest, dwDesiredAccess, dwFlags );
  29. }
  30. int DrawTextExW(HDC hdc, LPWSTR lpchTextW, int cchTextW, LPRECT lprc, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams)
  31. {
  32. int iResult = 0;
  33. LPSTR lpchTextA = NULL;
  34. int cchTextA = -1;
  35. cchTextA = WideCharToMultiByte(CP_ACP, 0, lpchTextW, cchTextW, NULL, 0, NULL, NULL);
  36. ASSERT(cchTextA > 0);
  37. lpchTextA = (LPSTR) LocalAlloc(LPTR, cchTextA+1);
  38. if (!lpchTextA)
  39. goto cleanup;
  40. iResult = WideCharToMultiByte(CP_ACP, 0, lpchTextW, cchTextW, lpchTextA, cchTextA, NULL, NULL);
  41. if (iResult <= 0)
  42. goto cleanup;
  43. iResult = DrawTextExA(hdc, lpchTextA, cchTextA, lprc, dwDTFormat, lpDTParams);
  44. cleanup:
  45. if (lpchTextA)
  46. LocalFree(lpchTextA);
  47. return iResult;
  48. }
  49. int SHAnsiToAnsiOld(LPCSTR pszSrc, LPSTR pszDst, int cchBuf)
  50. {
  51. return SHAnsiToAnsi( pszSrc, pszDst, cchBuf );
  52. }
  53. int SHUnicodeToUnicodeOld(LPCWSTR pszSrc, LPWSTR pszDst, int cchBuf)
  54. {
  55. return SHUnicodeToUnicode( pszSrc, pszDst, cchBuf );
  56. }
  57. // HtmlHelp Stubs.
  58. HWND WINAPI HtmlHelpA( HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData)
  59. {
  60. MwNotYetImplemented("HtmlHelpA");
  61. return 0;
  62. }
  63. HWND WINAPI HtmlHelpW( HWND hwndCaller, LPCWSTR pszFile, UINT uCommand, DWORD dwData)
  64. {
  65. MwNotYetImplemented("HtmlHelpW");
  66. return 0;
  67. }
  68. HWND MLHtmlHelpA(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData, DWORD dwCrossCodePage)
  69. {
  70. MwNotYetImplemented("MLHtmlHelpA");
  71. return 0;
  72. }
  73. HWND MLHtmlHelpW(HWND hwndCaller, LPCWSTR pszFile, UINT uCommand, DWORD dwData, DWORD dwCrossCodePage)
  74. {
  75. MwNotYetImplemented("MLHtmlHelpW");
  76. return 0;
  77. }
  78. LWSTDAPI SHCreateStreamOnFileAOld(LPCSTR pszFile, DWORD grfMode, IStream** ppstm)
  79. {
  80. return SHCreateStreamOnFileA(pszFile, grfMode, ppstm);
  81. }
  82. LWSTDAPI SHCreateStreamOnFileWOld(LPCWSTR pwszFile, DWORD grfMode, IStream** ppstm)
  83. {
  84. return SHCreateStreamOnFileW(pwszFile, grfMode, ppstm);
  85. }