一款显示网速、系统利用的软件
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.

OlsDef.h 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //-----------------------------------------------------------------------------
  2. // Author : hiyohiyo
  3. // Mail : hiyohiyo@crystalmark.info
  4. // Web : http://openlibsys.org/
  5. // License : The modified BSD license
  6. //
  7. // Copyright 2007-2020 OpenLibSys.org. All rights reserved.
  8. //-----------------------------------------------------------------------------
  9. #pragma once
  10. //-----------------------------------------------------------------------------
  11. //
  12. // DLL Status Code
  13. //
  14. //-----------------------------------------------------------------------------
  15. #define OLS_DLL_NO_ERROR 0
  16. #define OLS_DLL_UNSUPPORTED_PLATFORM 1
  17. #define OLS_DLL_DRIVER_NOT_LOADED 2
  18. #define OLS_DLL_DRIVER_NOT_FOUND 3
  19. #define OLS_DLL_DRIVER_UNLOADED 4
  20. #define OLS_DLL_DRIVER_NOT_LOADED_ON_NETWORK 5
  21. #define OLS_DLL_UNKNOWN_ERROR 9
  22. //-----------------------------------------------------------------------------
  23. //
  24. // Driver Type
  25. //
  26. //-----------------------------------------------------------------------------
  27. #define OLS_DRIVER_TYPE_UNKNOWN 0
  28. #define OLS_DRIVER_TYPE_WIN_9X 1
  29. #define OLS_DRIVER_TYPE_WIN_NT 2
  30. #define OLS_DRIVER_TYPE_WIN_NT4 3 // Obsolete
  31. #define OLS_DRIVER_TYPE_WIN_NT_X64 4
  32. #define OLS_DRIVER_TYPE_WIN_NT_IA64 5 // Reseved
  33. //-----------------------------------------------------------------------------
  34. //
  35. // PCI Error Code
  36. //
  37. //-----------------------------------------------------------------------------
  38. #define OLS_ERROR_PCI_BUS_NOT_EXIST (0xE0000001L)
  39. #define OLS_ERROR_PCI_NO_DEVICE (0xE0000002L)
  40. #define OLS_ERROR_PCI_WRITE_CONFIG (0xE0000003L)
  41. #define OLS_ERROR_PCI_READ_CONFIG (0xE0000004L)
  42. //-----------------------------------------------------------------------------
  43. //
  44. // Support Macros
  45. //
  46. //-----------------------------------------------------------------------------
  47. // Bus Number, Device Number and Function Number to PCI Device Address
  48. #define PciBusDevFunc(Bus, Dev, Func) ((Bus&0xFF)<<8) | ((Dev&0x1F)<<3) | (Func&7)
  49. // PCI Device Address to Bus Number
  50. #define PciGetBus(address) ((address>>8) & 0xFF)
  51. // PCI Device Address to Device Number
  52. #define PciGetDev(address) ((address>>3) & 0x1F)
  53. // PCI Device Address to Function Number
  54. #define PciGetFunc(address) (address&7)