home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / scrnsave / uniconv.h < prev   
C/C++ Source or Header  |  1994-05-26  |  3KB  |  60 lines

  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.  
  15. #include <string.h>
  16. #include <tchar.h>
  17. #ifdef UNICODE
  18. #include <wchar.h>
  19. #else
  20. #include <ctype.h>
  21. #endif
  22.  
  23.  
  24. /*--------------------------------------------------------------------------*/
  25. /*  Macros                                                                  */
  26. /*--------------------------------------------------------------------------*/
  27.  
  28. #define CharSizeOf(x)   (sizeof(x) / sizeof(*x))
  29. #define ByteCountOf(x)  ((x) * sizeof(TCHAR))
  30.  
  31. /*--------------------------------------------------------------------------*/
  32. /*  Constants                                                               */
  33. /*--------------------------------------------------------------------------*/
  34.  
  35. #define   UNICODE_FONT_NAME        TEXT("Lucida Sans Unicode")
  36. #define   UNICODE_FIXED_FONT_NAME  TEXT("Lucida Console")
  37.  
  38. /*--------------------------------------------------------------------------*/
  39. /*  Function Templates                                                      */
  40. /*--------------------------------------------------------------------------*/
  41.  
  42. INT      MyAtoi          (LPTSTR string);
  43. LONG     MyAtol          (LPTSTR  string);
  44. LPTSTR   MyItoa          (INT value, LPTSTR string, INT radix);
  45. LPTSTR   MyUltoa         (unsigned long value, LPTSTR string, INT radix);
  46. VOID     MySplitpath     (LPTSTR path, LPTSTR drive, LPTSTR dir,
  47.                           LPTSTR fname, LPTSTR ext);
  48.  
  49. LPTSTR   SkipProgramName (LPTSTR lpCmdLine);
  50.  
  51.  
  52. HANDLE   MyOpenFile      (LPTSTR lpszFile, TCHAR * lpszPath, DWORD fuMode);
  53. BOOL     MyCloseFile     (HANDLE hFile);
  54. BOOL     MyAnsiReadFile  (HANDLE hFile, UINT uCodePage, LPVOID lpBuffer, DWORD nChars);
  55. BOOL     MyByteReadFile  (HANDLE hFile, LPVOID lpBuffer, DWORD nBytes);
  56. BOOL     MyAnsiWriteFile (HANDLE hFile, UINT uCodePage, LPVOID lpBuffer, DWORD nChars);
  57. BOOL     MyByteWriteFile (HANDLE hFile, LPVOID lpBuffer, DWORD nBytes);
  58. LONG     MyFileSeek      (HANDLE hFile, LONG lDistanceToMove, DWORD dwMoveMethod);
  59.  
  60.