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.

46 lines
1.4 KiB

  1. #ifndef __WBEMERROR__
  2. #define __WBEMERROR__
  3. //=============================================================================
  4. //
  5. // WbemError.h
  6. //
  7. // Copyright (c) 1997-1999 Microsoft Corporation
  8. //
  9. // Implements string table based, error msgs for all of wbem.
  10. //
  11. // History:
  12. //
  13. // a-khint 5-mar-98 Created.
  14. //
  15. //=============================================================================
  16. #include "precomp.h"
  17. #include "DeclSpec.h"
  18. //---------------------------------------------------------
  19. // ErrorString: Extracts convenient information out of the
  20. // SCODE (HRESULT). If its not a wbem error,
  21. // system error msgs will be checked.
  22. // Parms:
  23. // sc - The error code from any facility.
  24. // errMsg - pointer to an allocated string buffer for
  25. // the error msg. Can be NULL.
  26. // errSize - the size of errMsg in chars.
  27. //
  28. // facility - pointer to an allocated string buffer for
  29. // the facility name. Can be NULL.
  30. // facSize - the size of errMsg in chars.
  31. //
  32. // sevIcon - ptr to receive the appropriate MB_ICON*
  33. // value for the sc. Can be NULL. Value
  34. // should be OR'ed with the MessageBox()
  35. // uType.
  36. //---------------------------------------------------------
  37. extern "C"
  38. {
  39. // formats the facility part for you too.
  40. POLARITY bool ErrorStringEx(HRESULT hr,
  41. TCHAR *errMsg, UINT errSize,
  42. UINT *sevIcon = NULL);
  43. }
  44. #endif __WBEMERROR__