Perf.Inc
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:3k
源码类别:

模拟服务器

开发平台:

C/C++

  1. MAXNAMELEN EQU 50
  2. MAXCOMPLEXSUBSTAT EQU 8
  3. perf_server_0 STRUC
  4. psrv0_Level DD ?
  5. psrv0_Flags DD ?
  6. psrv0_pszServerName DD ?
  7. psrv0_pszServerNodeName DD ?
  8. psrv0_pControlFunc DD ?
  9. perf_server_0 ENDS
  10. perf_stat_0 STRUC
  11. pst0_Level DD ?
  12. pst0_Flags DD ?
  13. pst0_pszStatName DD ?
  14. pst0_pszStatNodeName DD ?
  15. pst0_pszStatUnitName DD ?
  16. pst0_pszStatDescription DD ?
  17. pst0_pStatFunc DD ?
  18. perf_stat_0 ENDS
  19. PSTF_FUNCPTR EQU 00000001H
  20. PSTF_RATE EQU 00000002H
  21. PSTF_FREQ_HIGH EQU 00000000H
  22. PSTF_FREQ_LOW EQU 00000004H
  23. PSTF_FREQ_STATIC EQU 00000008H
  24. PSTF_FREQ_MASK EQU (PSTF_FREQ_STATIC OR PSTF_FREQ_LOW OR PSTF_FREQ_HIGH)
  25. PSTF_SCALE_LINEAR EQU 00000000H
  26. PSTF_SCALE_LOG10 EQU 00000010H
  27. PSTF_SCALE_LOG2 EQU 00000020H
  28. PSTF_SCALE_MASK EQU (PSTF_SCALE_LINEAR OR PSTF_SCALE_LOG10 OR PSTF_SCALE_LOG2)
  29. IOCTL_PERF_GET_STATS  EQU 10H
  30. IOCTL_PERF_START_STAT   EQU 11H
  31. IOCTL_PERF_STOP_STAT    EQU 12H
  32. PMSG_START_STAT EQU     11H
  33. PMSG_STOP_STAT EQU     12H
  34. Reg_Perf_Srv MACRO level:REQ, flags:REQ, servername:REQ, nodename:REQ, controlfunc:REQ
  35. local nothere
  36. VxDcall PERF_Get_Version
  37. or eax, eax
  38. jz nothere
  39. push OFFSET32 controlfunc
  40. push OFFSET32 nodename
  41. push OFFSET32 servername
  42. push flags
  43.         push level
  44. push esp
  45. VxDcall PERF_Server_Register
  46. add esp, 6*4
  47. nothere:
  48. ENDM
  49. Reg_Perf_Stat MACRO srvhandle:REQ, level:REQ, flags:REQ, name:REQ, nodename:REQ, unitname:REQ, desc:REQ, func:REQ
  50. push OFFSET32 func
  51. push OFFSET32 desc
  52. push OFFSET32 unitname
  53. push OFFSET32 nodename
  54. push OFFSET32 name
  55. push flags
  56. push level
  57. push esp
  58. push srvhandle
  59. VxDcall PERF_Server_Add_Stat
  60. add esp, 9*4
  61. ENDM
  62. Begin_Service_Table PERF
  63. PERF_Service PERF_Get_Version, LOCAL
  64. PERF_Service PERF_Server_Register, LOCAL
  65. PERF_Service PERF_Server_Deregister, LOCAL
  66. PERF_Service PERF_Server_Add_Stat, LOCAL
  67. PERF_Service PERF_Server_Remove_Stat, LOCAL
  68. End_Service_Table PERF
  69. HKEY_PERF_ROOT EQU <HKEY_LOCAL_MACHINE>
  70. PERF_REG_KEY EQU <"STATS">
  71. PERF_REG_NAME_SRV_NAME EQU <"NAME">
  72. PERF_REG_NAME_STAT_NAME EQU <"NAME">
  73. PERF_REG_NAME_STAT_FREQ EQU <"FREQUENCY">
  74. PERF_REG_NAME_STAT_HANDLE EQU <"HANDLE">
  75. PERF_REG_NAME_STAT_DESC EQU <"DESCRIPTION">
  76. PERF_REG_NAME_STAT_VALUE EQU <"VALUE">
  77. PERF_REG_NAME_STAT_DIFF EQU <"DIFFERENTIATE">
  78. PERF_REG_NAME_STAT_SCALETYPE EQU <"SCALETYPE">
  79. PERF_REG_NAME_STAT_STARTSCALE EQU <"STARTSCALE">
  80. PERF_REG_VAL_STAT_TRUE EQU <"TRUE">
  81. PERF_REG_VAL_STAT_FALSE EQU <"FALSE">
  82. PERF_REG_VAL_STAT_HIGH EQU <"HIGH">
  83. PERF_REG_VAL_STAT_LOW EQU <"LOW">
  84. PERF_REG_VAL_STAT_LINEAR EQU <"LINEAR">
  85. PERF_REG_VAL_STAT_LOG10 EQU <"LOG10">
  86. PERF_STAT_PREFIX EQU <"STAT">
  87. PSTF_INT_COMPLEX EQU 00000010H
  88. PSTF_EXT_COMPLEX EQU 00000020H