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.

95 lines
2.0 KiB

  1. #ifndef GLOBAL_HPP
  2. #define GLOBAL_HPP
  3. using namespace std;
  4. String unEscape(const String &str);
  5. extern String error;
  6. // The variable bellow was created to share the error hresult
  7. // between UI classes
  8. extern HRESULT hrError;
  9. #define BREAK_ON_FAILED_HRESULT_ERROR(hr,error_) \
  10. if (FAILED(hr)) \
  11. { \
  12. error=error_; \
  13. break; \
  14. }
  15. typedef list <
  16. long,
  17. Burnslib::Heap::Allocator<long>
  18. > LongList;
  19. ////////////////////////
  20. // Used in ReadLine
  21. #define EOF_HRESULT Win32ToHresult(ERROR_HANDLE_EOF)
  22. // Used in WinGetVLFilePointer. Declared in global.cpp as ={0};
  23. extern LARGE_INTEGER zero;
  24. // Used in CSVDSReader and ReadLine
  25. #define WinGetVLFilePointer(hFile, lpPositionHigh) \
  26. Win::SetFilePointerEx(hFile, zero, lpPositionHigh, FILE_CURRENT)
  27. HRESULT
  28. ReadLine(HANDLE handle,
  29. String& text,
  30. bool *endLineFound_=NULL);
  31. HRESULT
  32. ReadAllFile(const String &fileName,
  33. String &file);
  34. HRESULT
  35. GetMyDocuments(String &myDoc);
  36. // Retrieves a unique temporary name
  37. HRESULT
  38. GetWorkTempFileName
  39. (
  40. const wchar_t *lpPrefixString,
  41. String &name
  42. );
  43. // Retrieves a unique file name
  44. HRESULT
  45. GetWorkFileName
  46. (
  47. const String& baseName,
  48. const wchar_t *extension,
  49. String &name
  50. );
  51. void
  52. ShowError(HRESULT hr,
  53. const String &message);
  54. HRESULT
  55. Notepad(const String& file);
  56. HRESULT
  57. GetPreviousSuccessfullRun(
  58. const String &ldapPrefix,
  59. const String &rootContainerDn,
  60. bool &result
  61. );
  62. HRESULT
  63. SetPreviousSuccessfullRun(
  64. const String &ldapPrefix,
  65. const String &rootContainerDn
  66. );
  67. HRESULT
  68. getADLargeInteger(
  69. IDirectoryObject *iDirObj,
  70. wchar_t *name,
  71. ADS_LARGE_INTEGER &value
  72. );
  73. #endif