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.

57 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1996-1997, Microsoft Corporation.
  4. //
  5. // File: ixserror.hxx
  6. //
  7. // Contents: Query SSO error class
  8. //
  9. // History: 29 Oct 1996 Alanw Created
  10. //
  11. //----------------------------------------------------------------------------
  12. #pragma once
  13. //-----------------------------------------------------------------------------
  14. // CixssoError Declaration
  15. //-----------------------------------------------------------------------------
  16. class CixssoError
  17. {
  18. public:
  19. CixssoError( REFIID riid ) : _iid( riid )
  20. {
  21. Reset();
  22. }
  23. void Reset() { _fErr = FALSE; _sc = 0; SetErrorInfo(0, NULL); }
  24. BOOL IsError() { return _fErr; }
  25. // Set error string from error code
  26. void SetError( SCODE scError,
  27. ULONG iLine,
  28. WCHAR const * pwszFile,
  29. WCHAR const * loc,
  30. unsigned eErrClass,
  31. LCID lcid);
  32. // Set error string using preformatted description
  33. void SetError( SCODE scError,
  34. WCHAR const * pwszLoc,
  35. WCHAR const * pwszDescription);
  36. SCODE GetError() const { return _sc; }
  37. // Determine if we need to set an error for the given error code
  38. BOOL NeedToSetError(SCODE scError);
  39. private:
  40. BOOL _fErr;
  41. SCODE _sc;
  42. IID _iid;
  43. };