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.

90 lines
1.2 KiB

  1. #ifndef __MAIN_HXX
  2. #define __MAIN_HXX
  3. //
  4. // Public ADs includes
  5. //
  6. #define NULL_TERMINATED 0
  7. //
  8. // ********* Useful macros
  9. //
  10. #define BAIL_ON_NULL(p) \
  11. if (!(p)) { \
  12. goto error; \
  13. }
  14. #define BAIL_ON_FAILURE(hr) \
  15. if (FAILED(hr)) { \
  16. goto error; \
  17. }
  18. #define ADS_FREE(pMem) \
  19. if (pMem) { \
  20. FreeADsMem(pMem); \
  21. pMem = NULL; \
  22. }
  23. #define FREE_UNICODE_STRING(pMem) \
  24. if (pMem) { \
  25. FreeUnicodeString(pMem); \
  26. pMem = NULL; \
  27. }
  28. void
  29. PrintColumn(
  30. PADS_SEARCH_COLUMN pColumn,
  31. LPWSTR pszColumnName
  32. );
  33. int
  34. AnsiToUnicodeString(
  35. LPSTR pAnsi,
  36. LPWSTR pUnicode,
  37. DWORD StringLength
  38. );
  39. int
  40. UnicodeToAnsiString(
  41. LPWSTR pUnicode,
  42. LPSTR pAnsi,
  43. DWORD StringLength
  44. );
  45. LPWSTR
  46. AllocateUnicodeString(
  47. LPSTR pAnsiString
  48. );
  49. void
  50. FreeUnicodeString(
  51. LPWSTR pUnicodeString
  52. );
  53. void
  54. PrintUsage(
  55. void
  56. );
  57. HRESULT
  58. ProcessArgs(
  59. int argc,
  60. char * argv[]
  61. );
  62. LPWSTR
  63. RemoveWhiteSpaces(
  64. LPWSTR pszText
  65. );
  66. #endif // __MAIN_HXX