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.

71 lines
2.2 KiB

  1. #ifndef __LDERROR_HPP__
  2. #define __LDERROR_HPP__
  3. /*++
  4. Copyright (C) 2000 Microsoft Corporation
  5. All rights reserved.
  6. Module Name:
  7. lderror.hpp
  8. Abstract:
  9. This is a common class declaration which could be used by
  10. all classes for translating between differnet Error codes ,
  11. as those genarated from Win32 , vs those genarated from
  12. RPC vesrus those genarated from COM Interfaces
  13. Author:
  14. Khaled Sedky (khaleds) 18-Jan-2000
  15. Revision History:
  16. --*/
  17. #define HRESULTTOWIN32(hres) \
  18. ((HRESULT_FACILITY(hres) == FACILITY_WIN32) \
  19. ? HRESULT_CODE(hres) \
  20. : (hres))
  21. class TLd64BitDllsErrorHndlr
  22. {
  23. public:
  24. TLd64BitDllsErrorHndlr(
  25. VOID
  26. );
  27. ~TLd64BitDllsErrorHndlr(
  28. VOID
  29. );
  30. HRESULT
  31. GetLastErrorAsHRESULT(
  32. VOID
  33. ) const;
  34. HRESULT
  35. GetLastErrorAsHRESULT(
  36. DWORD Error
  37. ) const;
  38. DWORD
  39. GetLastErrorFromHRESULT(
  40. IN HRESULT hRes
  41. ) const;
  42. DWORD
  43. TranslateExceptionCode(
  44. IN DWORD ExceptionCode
  45. ) const;
  46. DWORD
  47. MapNtStatusToWin32Error(
  48. IN NTSTATUS Status
  49. ) const;
  50. };
  51. #endif //__LDERROR_HPP__