ITek_util.h
上传用户:cnfair
上传日期:2007-01-07
资源大小:32k
文件大小:1k
源码类别:

驱动编程

开发平台:

Visual C++

  1. /////////////////////////////////////////////////////////////////////////
  2. // any utility routines header file
  3. #ifndef _ITEK_UTIL_H_
  4. #define _ITEK_UTIL_H_
  5. #ifdef _cplusplus
  6. extern "C" {
  7. #endif
  8. //NdisAllocateSharedMemory() doesn't work well in Windows95
  9. //alignmask values
  10. #define PHYSICAL_ALIGN_4 (0x00000000)
  11. #define PHYSICAL_ALIGN_8 (0x00000001)
  12. #define PHYSICAL_ALIGN_16 (0x00000003)
  13. #define PHYSICAL_ALIGN_32 (0x00000007)
  14. #define PHYSICAL_ALIGN_64 (0x0000000F)
  15. #define PHYSICAL_ALIGN_128 (0x0000001F)
  16. VOID NDIS_API
  17. ITekAllocateSharedMemory(
  18. IN NDIS_HANDLE NdisAdapterHandle,
  19. IN ULONG Length,
  20. IN ULONG AlignMask,
  21. OUT PVOID *VirtualAddress,
  22. OUT PNDIS_PHYSICAL_ADDRESS PhysicalAddress
  23. );
  24. VOID NDIS_API
  25. ITekFreeSharedMemory(
  26. IN NDIS_HANDLE NdisAdapterHandle,
  27. IN PVOID VirtualAddress
  28. ); 
  29. VOID NDIS_API
  30. ITekAllocateMemory(
  31. OUT PVOID *VirtualMemory,
  32. IN ULONG nBytes
  33. );
  34. VOID NDIS_API
  35. ITekFreeMemory(
  36. IN PVOID VirtualMemory
  37. );
  38. #ifdef ITEK_TIMER
  39. VOID NDIS_API
  40. ITekTimerFunction(
  41. IN PVOID SystemSpecific1,
  42. IN PVOID FunctionContext,
  43. IN PVOID SystemSpecific2,
  44. IN PVOID SystemSpecific3
  45. );
  46. #endif //ITEK_TIMER
  47. #ifdef _cplusplus
  48. }
  49. #endif
  50. #endif