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.

23 lines
977 B

  1. #pragma once
  2. #include "nt.h"
  3. #include "ntrtl.h"
  4. #include "nturtl.h"
  5. #include "windows.h"
  6. #include "malloc.h"
  7. #define MAX(a,b) a>b? a : b
  8. #define FN_TRACE_NTSTATUS(x)
  9. #define IF_NOT_NTSTATUS_SUCCESS_EXIT(x) do { Status = (x); if (!(NT_SUCCESS(Status))) goto Exit;} while(0);
  10. #define FUSION_NEW_BLOB(x) (BYTE *)malloc(x)
  11. #define FUSION_DELETE_BLOB(x) free(x)
  12. #define FUSION_NEW_ARRAY(TYPE, dwEntryCount) (TYPE *)malloc(sizeof(TYPE) * dwEntryCount)
  13. #define FUSION_FREE_ARRAY(x) free(x)
  14. #define IFALLOCFAILED_EXIT(x) do { (x); if( (x) == NULL) {Status = STATUS_NO_MEMORY; goto Exit; }} while(0)
  15. #define IF_ZERO_EXIT(x) do {if ((x) == 0) {Status = STATUS_UNSUCCESSFUL; goto Exit;}} while (0)
  16. #define PARAMETER_CHECK(x) do {if (!(x)) {Status = STATUS_INVALID_PARAMETER; goto Exit;}} while(0)
  17. #define FN_EPILOG if (false) goto Exit; Exit: return Status;
  18. #define INTERNAL_ERROR_CHECK(x) do {if (!(x)) {Status = STATUS_INTERNAL_ERROR; goto Exit;} } while(0)