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.

25 lines
637 B

  1. #include <mvopsys.h>
  2. #include <iterror.h>
  3. /****************************************************************************
  4. *
  5. * @func HRESULT SetErr |
  6. * Save the error and its location into the error buffer
  7. * @parm HRESULT* phr |
  8. * Pointer to the hresult
  9. * @parm HRESULT ErrCode |
  10. * Error code
  11. * @parm int iUserCode |
  12. * Any information that the SDE wants to associate with the error
  13. * @rdesc
  14. * The error code
  15. ****************************************************************************/
  16. HRESULT PASCAL SetErr (PHRESULT phr, HRESULT ErrCode)
  17. {
  18. if (phr == NULL)
  19. return ErrCode;
  20. return (*phr = ErrCode);
  21. }