test: userdata.h Source File

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# userdata.h

Go to the documentation of this file.

    00001 /*++ BUILD Version: 0001
    00002
    00003 Copyright (c) 1985 - 1999, Microsoft Corporation
    00004
    00005 Module Name:
    00006
    00007       userdata.h
    00008
    00009 Abstract:
    00010
    00011     Header file for the USER Extensible Object data definitions
    00012
    00013     This file contains definitions to construct the dynamic data
    00014     which is returned by the Configuration Registry.  Data from
    00015     win32k.sys is placed into the structures shown here.
    00016
    00017 Revisions:
    00018     Sept 15 1997    MCostea     Added CriticalSection object
    00019
    00020 --*/
    00021
    00022 #ifndef _USERDATA_H_
    00023 #define _USERDATA_H_
    00024
    00025 //
    00026 //  The routines that load these structures assume that all fields
    00027 //  are packed and aligned on DWORD boundaries. Alpha support may
    00028 //  change this assumption so the pack pragma is used here to insure
    00029 //  the DWORD packing assumption remains valid.
    00030 //
    00031 #pragma pack (4)
    00032
    00033 //
    00034 //  Extensible Object definitions
    00035 //
    00036
    00037 //  Update the following define when adding an object type.
    00038
    00039 #define USER_NUM_PERF_OBJECT_TYPES 2
    00040
    00041 //
    00042 // Create a section like this for each performance object you add
    00043 //
    00044
    00045 //----------------------------------------------------------------------------
    00046 //
    00047 //  USER Resource object type counter definitions.
    00048 //
    00049 //  These are used in the counter definitions to describe the relative
    00050 //  position of each counter in the returned data.
    00051 //
    00052
    00053 //
    00054 // If adding more counters please preserve NumTotals as the first one and
    00055 // NumInputContexts as the last one.  The counters are sorted in perfmon
    00056 //
    00057 #define NUM_TOTALS_OFFSET         sizeof(DWORD)
    00058 #define NUM_FREEONES_OFFSET       NUM_TOTALS_OFFSET     + sizeof(DWORD)
    00059 #define NUM_WINDOWS_OFFSET        NUM_FREEONES_OFFSET       + sizeof(DWORD)
    00060 #define NUM_MENUS_OFFSET          NUM_WINDOWS_OFFSET    + sizeof(DWORD)
    00061 #define NUM_CURSORS_OFFSET        NUM_MENUS_OFFSET      + sizeof(DWORD)
    00062 #define NUM_SETWINDOWPOS_OFFSET   NUM_CURSORS_OFFSET    + sizeof(DWORD)
    00063 #define NUM_HOOKS_OFFSET          NUM_SETWINDOWPOS_OFFSET   + sizeof(DWORD)
    00064 #define NUM_CLIPDATAS_OFFSET      NUM_HOOKS_OFFSET      + sizeof(DWORD)
    00065 #define NUM_CALLPROCS_OFFSET      NUM_CLIPDATAS_OFFSET  + sizeof(DWORD)
    00066 #define NUM_ACCELTABLES_OFFSET    NUM_CALLPROCS_OFFSET  + sizeof(DWORD)
    00067 #define NUM_DDEACCESS_OFFSET      NUM_ACCELTABLES_OFFSET    + sizeof(DWORD)
    00068 #define NUM_DDECONVS_OFFSET       NUM_DDEACCESS_OFFSET  + sizeof(DWORD)
    00069 #define NUM_DDEXACTS_OFFSET       NUM_DDECONVS_OFFSET   + sizeof(DWORD)
    00070 #define NUM_MONITORS_OFFSET       NUM_DDEXACTS_OFFSET   + sizeof(DWORD)
    00071 #define NUM_KBDLAYOUTS_OFFSET     NUM_MONITORS_OFFSET   + sizeof(DWORD)
    00072 #define NUM_KBDFILES_OFFSET       NUM_KBDLAYOUTS_OFFSET + sizeof(DWORD)
    00073 #define NUM_WINEVENTHOOKS_OFFSET  NUM_KBDFILES_OFFSET   + sizeof(DWORD)
    00074 #define NUM_TIMERS_OFFSET         NUM_WINEVENTHOOKS_OFFSET  + sizeof(DWORD)
    00075 #define NUM_INPUTCONTEXTS_OFFSET  NUM_TIMERS_OFFSET     + sizeof(DWORD)
    00076
    00077 #define SIZE_OF_USER_PERFORMANCE_DATA \
    00078                     NUM_INPUTCONTEXTS_OFFSET + sizeof(DWORD)
    00079
    00080 typedef struct _USER_DATA_DEFINITION {
    00081     PERF_OBJECT_TYPE           UserObjectType;
    00082     PERF_COUNTER_DEFINITION    NumTotals;
    00083     PERF_COUNTER_DEFINITION    NumFreeOnes;
    00084     PERF_COUNTER_DEFINITION    NumWindows;
    00085     PERF_COUNTER_DEFINITION    NumMenus;
    00086     PERF_COUNTER_DEFINITION    NumCursors;
    00087     PERF_COUNTER_DEFINITION    NumSetwindowPos;
    00088     PERF_COUNTER_DEFINITION    NumHooks;
    00089     PERF_COUNTER_DEFINITION    NumClipdatas;
    00090     PERF_COUNTER_DEFINITION    NumCallProcs;
    00091     PERF_COUNTER_DEFINITION    NumAccelTables;
    00092     PERF_COUNTER_DEFINITION    NumDDEAccess;
    00093     PERF_COUNTER_DEFINITION    NumDDEConvs;
    00094     PERF_COUNTER_DEFINITION    NumDDEXActs;
    00095     PERF_COUNTER_DEFINITION    NumMonitors;
    00096     PERF_COUNTER_DEFINITION    NumKBDLayouts;
    00097     PERF_COUNTER_DEFINITION    NumKBDFiles;
    00098     PERF_COUNTER_DEFINITION    NumWinEventHooks;
    00099     PERF_COUNTER_DEFINITION    NumTimers;
    00100     PERF_COUNTER_DEFINITION    NumInputContexts;
    00101 } USER_DATA_DEFINITION;
    00102 #define NUM_USER_COUNTERS    (sizeof(USER_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/sizeof(PERF_COUNTER_DEFINITION)
    00103
    00104 //----------------------------------------------------------------------------
    00105 //
    00106 //  Critical Section object definition
    00107 //
    00108 //  These are used in the counter definitions to describe the relative
    00109 //  position of each counter in the returned data.
    00110 //
    00111
    00112 #define CS_EXENTER_OFFSET         sizeof(DWORD)
    00113 #define CS_SHENTER_OFFSET         CS_EXENTER_OFFSET + sizeof(DWORD)
    00114 #define CS_EXTIME_OFFSET          CS_SHENTER_OFFSET + sizeof(DWORD)
    00115
    00116 #define SIZE_OF_CS_PERFORMANCE_DATA \
    00117                     CS_EXTIME_OFFSET + sizeof(DWORD)
    00118
    00119 typedef struct _CS_DATA_DEFINITION {
    00120     PERF_OBJECT_TYPE           CSObjectType;
    00121     PERF_COUNTER_DEFINITION    CSExEnter;
    00122     PERF_COUNTER_DEFINITION    CSShEnter;
    00123     PERF_COUNTER_DEFINITION    CSExTime;
    00124 } CS_DATA_DEFINITION;
    00125 #define NUM_CS_COUNTERS    (sizeof(CS_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/sizeof(PERF_COUNTER_DEFINITION)
    00126
    00127 #pragma pack ()
    00128
    00129 #endif //_USERDATA_H_
    00130