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.

69 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1999, Microsoft Corporation
  3. Module Name:
  4. natapip.h
  5. Abstract:
  6. This module contains private declarations for the NAT's I/O interface
  7. to the kernel-mode driver.
  8. Author:
  9. Abolade Gbadegesin (aboladeg) 16-Jun-1999
  10. Revision History:
  11. --*/
  12. #ifndef _NATAPI_NATAPIP_H_
  13. #define _NATAPI_NATAPIP_H_
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
  18. #define FREE(x) HeapFree(GetProcessHeap(), 0, (x))
  19. #ifndef REFERENCE_OBJECT
  20. #define REFERENCE_OBJECT(x,deleted) \
  21. (deleted(x) ? FALSE : (InterlockedIncrement(&(x)->ReferenceCount), TRUE))
  22. #endif
  23. #ifndef DEREFERENCE_OBJECT
  24. #define DEREFERENCE_OBJECT(x,cleanup) \
  25. (InterlockedDecrement(&(x)->ReferenceCount) ? TRUE : (cleanup(x), FALSE))
  26. #endif
  27. VOID
  28. NatCloseDriver(
  29. HANDLE FileHandle
  30. );
  31. ULONG
  32. NatLoadDriver(
  33. OUT PHANDLE FileHandle,
  34. PIP_NAT_GLOBAL_INFO GlobalInfo
  35. );
  36. ULONG
  37. NatOpenDriver(
  38. OUT PHANDLE FileHandle
  39. );
  40. ULONG
  41. NatUnloadDriver(
  42. HANDLE FileHandle
  43. );
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif // _NATAPI_NATAPIP_H_