home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / BOCOLE.PAK / UTILS.CPP < prev    next >
C/C++ Source or Header  |  1995-08-29  |  1KB  |  46 lines

  1. // $Header:   N:\admin\ocf\source\bocole\utils.cpv   2.0.1.0   10 Apr 1995 18:06:48   CQUINN  $
  2. //**************************************************************************
  3. //
  4. // Utils.h -- Contains some functions to make 32-bit bocole work under WIN95.
  5. //
  6. // Copyright (c) 1995 by Borland International, Inc. All rights reserved
  7. //
  8. //**************************************************************************
  9. #include "BOle.h"
  10. #include "Utils.h"
  11.  
  12. #ifdef ANSI
  13. LPWSTR lstrcpyW2(LPWSTR lpString1, LPCWSTR lpString2)
  14. {
  15.   while (*lpString1++ = *lpString2++)
  16.   ;
  17.  
  18.   return lpString1;
  19. }
  20.  
  21. LPWSTR lstrcpynW2(LPWSTR lpString1, LPCWSTR lpString2, int count)
  22. {
  23.   for (int i = 0; i < count; i++)
  24.     *(lpString1+i) = *(lpString2+i);
  25.  
  26.   return lpString1;
  27. }
  28.  
  29. LPWSTR lstrcatW2(LPWSTR lpString1, LPCWSTR lpString2)
  30. {
  31.   lstrcpyW2(lpString1+lstrlenW2(lpString1), lpString2);
  32.  
  33.   return lpString1;
  34. }
  35.  
  36. int lstrlenW2(LPCWSTR lpString)
  37. {
  38.   int count = 0;
  39.  
  40.   while (*lpString++)
  41.     count++;
  42.  
  43.   return count;
  44. }
  45. #endif
  46.