VirtualBox

Changeset 63050 in vbox for trunk/include


Ignore:
Timestamp:
Aug 5, 2016 3:21:41 PM (8 years ago)
Author:
vboxsync
Message:

iprt/assert.h: Added AssertNtStatus and AssertNtStatusSuccess for use in driver code and other places where we interface with NT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/assert.h

    r60965 r63050  
    28142814    } while (0)
    28152815
     2816#ifdef RT_OS_WINDOWS
     2817
     2818/** @def AssertNtStatus
     2819 * Asserts that the NT_SUCCESS() returns true for the given NTSTATUS value.
     2820 *
     2821 * @param   a_rcNt  The NTSTATUS to check.  Will be evaluated twice and
     2822 *                  subjected to NOREF().
     2823 * @sa      AssertRC()
     2824 */
     2825# define AssertNtStatus(a_rcNt) \
     2826    do { AssertMsg(NT_SUCCESS(a_rcNt), ("%#x\n", (a_rcNt))); NOREF(a_rcNt); } while (0)
     2827
     2828/** @def AssertNtStatusSuccess
     2829 * Asserts that the given NTSTATUS value equals STATUS_SUCCESS.
     2830 *
     2831 * @param   a_rcNt  The NTSTATUS to check.  Will be evaluated twice and
     2832 *                  subjected to NOREF().
     2833 * @sa      AssertRCSuccess()
     2834 */
     2835# define AssertNtStatusSuccess(a_rcNt) \
     2836    do { AssertMsg((a_rcNt) == STATUS_SUCCESS, ("%#x\n", (a_rcNt))); NOREF(a_rcNt); } while (0)
     2837
     2838#endif /* RT_OS_WINDOWS */
     2839
    28162840/** @} */
    28172841
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette