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.

78 lines
2.2 KiB

  1. //+======================================================
  2. //
  3. // File: olechar.h
  4. //
  5. // Purpose: Provide wrappers for string-related
  6. // functions so that the Ansi or Unicode function
  7. // is called, whichever is appropriate for the
  8. // current OLECHAR definition.
  9. //
  10. // This file is similar to "tchar.h", except
  11. // that it covers OLECHARs rather than TCHARs.
  12. //
  13. //+======================================================
  14. #ifndef _OLECHAR_H_
  15. #define _OLECHAR_H_
  16. //#include <objbase.h>
  17. #ifdef OLE2ANSI
  18. # ifdef _MAC
  19. # define ocslen strlen
  20. # define ocscpy strcpy
  21. # define ocscmp strcmp
  22. # define ocscat strcat
  23. # define ocschr strchr
  24. # define soprintf sprintf
  25. # define oprintf printf
  26. # define ocsnicmp _strnicmp
  27. # else
  28. # define ocslen lstrlenA
  29. # define ocscpy lstrcpyA
  30. # define ocscmp lpstrcmpA
  31. # define ocscat lpstrcatA
  32. # define ocschr strchr
  33. # define soprintf sprintf
  34. # define oprintf printf
  35. # define ocsnicmp _strnicmp
  36. # endif
  37. // "Unsigned Long to OLESTR"
  38. # define ULTOO(value,string,radix) _ultoa( (value), (string), (radix) )
  39. #else // !OLE2ANSI
  40. # ifdef IPROPERTY_DLL
  41. # define ocslen lstrlenW
  42. # define ocscpy wcscpy
  43. # define ocscmp wcscmp
  44. # define ocscat wcscat
  45. # define ocschr wcschr
  46. # define ocsnicmp _wcsnicmp
  47. # define soprintf swprintf
  48. # define oprintf wprintf
  49. # define ocsnicmp _wcsnicmp
  50. # define ocsstr wcsstr
  51. # else
  52. # define ocslen lstrlenW
  53. # define ocscpy lstrcpyW
  54. # define ocscmp lstrcmpW
  55. # define ocscat lstrcatW
  56. # define ocschr wcschr
  57. # define ocsnicmp _wcsnicmp
  58. # define soprintf swprintf
  59. # define oprintf wprintf
  60. # define ocsnicmp _wcsnicmp
  61. # define ocsstr wcsstr
  62. # endif
  63. // "Unsigned Long to OLESTR"
  64. # define ULTOO(value,string,radix) _ultow( (value), (string), (radix) )
  65. #endif // !OLE2ANSI
  66. #endif // !_OLECHAR_H_