Source code of Windows XP (NT5)
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.

59 lines
2.9 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* UNICONV.H - */
  4. /* */
  5. /* My special Unicode workaround file */
  6. /* */
  7. /* Created by : Diane K. Oh */
  8. /* On Date : June 11, 1992 */
  9. /* */
  10. /* File was created to Unicode enable special function calls of */
  11. /* WIN32 Shell applications. */
  12. /* */
  13. /****************************************************************************/
  14. #include <string.h>
  15. #include <tchar.h>
  16. #ifdef UNICODE
  17. #include <wchar.h>
  18. #else
  19. #include <ctype.h>
  20. #endif
  21. /*--------------------------------------------------------------------------*/
  22. /* Macros */
  23. /*--------------------------------------------------------------------------*/
  24. #define CharSizeOf(x) (sizeof(x) / sizeof(*x))
  25. #define ByteCountOf(x) ((x) * sizeof(TCHAR))
  26. /*--------------------------------------------------------------------------*/
  27. /* Constants */
  28. /*--------------------------------------------------------------------------*/
  29. #define UNICODE_FONT_NAME TEXT("Lucida Sans Unicode")
  30. #define UNICODE_FIXED_FONT_NAME TEXT("Lucida Console")
  31. /*--------------------------------------------------------------------------*/
  32. /* Function Templates */
  33. /*--------------------------------------------------------------------------*/
  34. INT MyAtoi (LPTSTR string);
  35. LONG MyAtol (LPTSTR string);
  36. LPTSTR MyItoa (INT value, LPTSTR string, INT radix);
  37. LPTSTR MyUltoa (unsigned long value, LPTSTR string, INT radix);
  38. VOID MySplitpath (LPTSTR path, LPTSTR drive, LPTSTR dir,
  39. LPTSTR fname, LPTSTR ext);
  40. LPTSTR SkipProgramName (LPTSTR lpCmdLine);
  41. HANDLE MyOpenFile (LPTSTR lpszFile, TCHAR * lpszPath, DWORD fuMode);
  42. BOOL MyCloseFile (HANDLE hFile);
  43. BOOL MyAnsiReadFile (HANDLE hFile, UINT uCodePage, LPVOID lpBuffer, DWORD nChars);
  44. BOOL MyByteReadFile (HANDLE hFile, LPVOID lpBuffer, DWORD nBytes);
  45. BOOL MyAnsiWriteFile (HANDLE hFile, UINT uCodePage, LPVOID lpBuffer, DWORD nChars);
  46. BOOL MyByteWriteFile (HANDLE hFile, LPVOID lpBuffer, DWORD nBytes);
  47. LONG MyFileSeek (HANDLE hFile, LONG lDistanceToMove, DWORD dwMoveMethod);