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.

64 lines
1.5 KiB

  1. #ifndef _CUSTOMERROR_HXX_
  2. #define _CUSTOMERROR_HXX_
  3. #define SUBERROR_WILDCARD ((USHORT)(-1))
  4. class CUSTOM_ERROR_ENTRY
  5. {
  6. public:
  7. CUSTOM_ERROR_ENTRY()
  8. {
  9. InitializeListHead( &_listEntry );
  10. }
  11. LIST_ENTRY _listEntry;
  12. USHORT _StatusCode;
  13. USHORT _SubError;
  14. STRU _strError;
  15. BOOL _fIsFile;
  16. };
  17. class CUSTOM_ERROR_TABLE
  18. {
  19. public:
  20. CUSTOM_ERROR_TABLE()
  21. {
  22. InitializeListHead( &_ErrorListHead );
  23. }
  24. ~CUSTOM_ERROR_TABLE()
  25. {
  26. CUSTOM_ERROR_ENTRY * pEntry;
  27. while ( !IsListEmpty( &_ErrorListHead ) )
  28. {
  29. pEntry = CONTAINING_RECORD( _ErrorListHead.Flink,
  30. CUSTOM_ERROR_ENTRY,
  31. _listEntry );
  32. DBG_ASSERT( pEntry != NULL );
  33. RemoveEntryList( &( pEntry->_listEntry ) );
  34. delete pEntry;
  35. }
  36. }
  37. HRESULT
  38. FindCustomError(
  39. USHORT StatusCode,
  40. USHORT SubError,
  41. BOOL * pfIsFile,
  42. STRU * pstrError
  43. );
  44. HRESULT
  45. BuildTable(
  46. WCHAR * pszErrorList
  47. );
  48. private:
  49. LIST_ENTRY _ErrorListHead;
  50. };
  51. #endif