Subversion Repositories Games.Chess Giants

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
//==================================================================================================
2
// PIXPlugin.h
3
//
4
// Microsoft PIX Plugin Header
5
//
6
// Copyright (c) Microsoft Corporation, All rights reserved
7
//==================================================================================================
8
 
9
#pragma once
10
 
11
#ifdef __cplusplus
12
extern "C"
13
{
14
#endif
15
 
16
 
17
//==================================================================================================
18
// PIX_PLUGIN_SYSTEM_VERSION - Indicates version of the plugin interface the plugin is built with.
19
//==================================================================================================
20
#define PIX_PLUGIN_SYSTEM_VERSION 0x101
21
 
22
 
23
//==================================================================================================
24
// PIXCOUNTERID - A unique identifier for each PIX plugin counter.
25
//==================================================================================================
26
typedef int PIXCOUNTERID;
27
 
28
 
29
//==================================================================================================
30
// PIXCOUNTERDATATYPE - Indicates what type of data the counter produces.
31
//==================================================================================================
32
enum PIXCOUNTERDATATYPE
33
{
34
    PCDT_RESERVED,
35
    PCDT_FLOAT,
36
    PCDT_INT,
37
    PCDT_INT64,
38
    PCDT_STRING,
39
};
40
 
41
 
42
//==================================================================================================
43
// PIXPLUGININFO - This structure is filled out by PIXGetPluginInfo and passed back to PIX.
44
//==================================================================================================
45
struct PIXPLUGININFO
46
{
47
    // Filled in by caller:
48
    HINSTANCE hinst;
49
 
50
    // Filled in by PIXGetPluginInfo:
51
    WCHAR* pstrPluginName;              // Name of plugin
52
    int iPluginVersion;                 // Version of this particular plugin
53
    int iPluginSystemVersion;           // Version of PIX's plugin system this plugin was designed for
54
};
55
 
56
 
57
//==================================================================================================
58
// PIXCOUNTERINFO - This structure is filled out by PIXGetCounterInfo and passed back to PIX 
59
//                  to allow PIX to determine information about the counters in the plugin.
60
//==================================================================================================
61
struct PIXCOUNTERINFO
62
{
63
    PIXCOUNTERID counterID;             // Used to uniquely ID this counter
64
    WCHAR* pstrName;                    // String name of the counter
65
    PIXCOUNTERDATATYPE pcdtDataType;    // Data type returned by this counter
66
};
67
 
68
 
69
//==================================================================================================
70
// PIXGetPluginInfo - This returns basic information about this plugin to PIX.
71
//==================================================================================================
72
BOOL WINAPI PIXGetPluginInfo( PIXPLUGININFO* pPIXPluginInfo );
73
 
74
 
75
//==================================================================================================
76
// PIXGetCounterInfo - This returns an array of PIXCOUNTERINFO structs to PIX.  
77
//                     These PIXCOUNTERINFOs allow PIX to enumerate the counters contained
78
//                     in this plugin.
79
//==================================================================================================
80
BOOL WINAPI PIXGetCounterInfo( DWORD* pdwReturnCounters, PIXCOUNTERINFO** ppCounterInfoList );
81
 
82
 
83
//==================================================================================================
84
// PIXGetCounterDesc - This is called by PIX to request a description of the indicated counter.
85
//==================================================================================================
86
BOOL WINAPI PIXGetCounterDesc( PIXCOUNTERID id, WCHAR** ppstrCounterDesc );
87
 
88
 
89
//==================================================================================================
90
// PIXBeginExperiment - This called by PIX once per counter when instrumentation starts.
91
//==================================================================================================
92
BOOL WINAPI PIXBeginExperiment( PIXCOUNTERID id, const WCHAR* pstrApplication );
93
 
94
 
95
//==================================================================================================
96
// PIXEndFrame - This is called by PIX once per counter at the end of each frame to gather the
97
//               counter value for that frame.  Note that the pointer to the return data must
98
//               continue to point to valid counter data until the next call to PIXEndFrame (or
99
//               PIXEndExperiment) for the same counter.  So do not set *ppReturnData to the same 
100
//               pointer for multiple counters, or point to a local variable that will go out of 
101
//               scope.  See the sample PIX plugin for an example of how to structure a plugin
102
//               properly.
103
//==================================================================================================
104
BOOL WINAPI PIXEndFrame( PIXCOUNTERID id, UINT iFrame, DWORD* pdwReturnBytes, BYTE** ppReturnData );
105
 
106
 
107
//==================================================================================================
108
// PIXEndExperiment - This is called by PIX once per counter when instrumentation ends.
109
//==================================================================================================
110
BOOL WINAPI PIXEndExperiment( PIXCOUNTERID id );
111
 
112
 
113
#ifdef __cplusplus
114
};
115
#endif
116
 
117
//==================================================================================================
118
// eof: PIXPlugin.h
119
//==================================================================================================
120