avoidtry.h 1.1 KB

123456789101112131415161718192021222324252627
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Use, duplication, or disclosure by the U.S. Government is subject to
  12. // restrictions set forth in FAR 52.227-19 (Commercial Computer
  13. // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
  14. // (Rights in Technical Data and Computer Software), as applicable.
  15. //
  16. #define ASITRYSET IncreaseGlobalAccount(0); try
  17. #define ASICATCHALL catch (int ASITRYCODE)
  18. #define ASITRYDEL DecreaseGlobalAccount(0);
  19. #define ASITHROW(x) if( CheckGlobalAccount(0) ) throw((int)(x))
  20. #pragma pack (push, 8)
  21. DLLScope int IncreaseGlobalAccount(int ind);
  22. DLLScope int DecreaseGlobalAccount(int ind);
  23. DLLScope int CheckGlobalAccount(int ind);
  24. #pragma pack (pop)