/[rtss_sdk]/trunk/Samples/SharedMemory/RTSSSharedMemorySample/RTSSSharedMemorySampleDlg.h
ViewVC logotype

Contents of /trunk/Samples/SharedMemory/RTSSSharedMemorySample/RTSSSharedMemorySampleDlg.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Aug 8 11:41:35 2014 UTC (5 years, 1 month ago) by william
File MIME type: text/plain
File size: 3391 byte(s)
initial commit of RTSS SDK (from 6.1.0.7305)
Available from: http://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html
1 // RTSSSharedMemorySampleDlg.h : header file
2 //
3 // created by Unwinder
4 /////////////////////////////////////////////////////////////////////////////
5 #ifndef _RTSSSHAREDMEMORYSAMPLEDLG_H_INCLUDED_
6 #define _RTSSSHAREDMEMORYSAMPLEDLG_H_INCLUDED_
7 /////////////////////////////////////////////////////////////////////////////
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
11 /////////////////////////////////////////////////////////////////////////////
12 #include "RTSSSharedMemory.h"
13 /////////////////////////////////////////////////////////////////////////////
14 #define MAX_CPU 8
15 /////////////////////////////////////////////////////////////////////////////
16 // define constants / structures and function prototype for NTDLL.dll
17 // NtQuerySystemInformation function which will be used for CPU usage
18 // calculation
19 /////////////////////////////////////////////////////////////////////////////
20 #define SystemProcessorPerformanceInformation 8
21 /////////////////////////////////////////////////////////////////////////////
22 typedef HRESULT (WINAPI *NTQUERYSYSTEMINFORMATION)(UINT, PVOID, ULONG, PULONG);
23 /////////////////////////////////////////////////////////////////////////////
24 typedef struct SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
25 {
26 LARGE_INTEGER IdleTime;
27 LARGE_INTEGER KernelTime;
28 LARGE_INTEGER UserTime;
29 LARGE_INTEGER Reserved1[2];
30 ULONG Reserved2;
31 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
32 /////////////////////////////////////////////////////////////////////////////
33 class CRTSSSharedMemorySampleDlg : public CDialog
34 {
35 // Construction
36 public:
37 CRTSSSharedMemorySampleDlg(CWnd* pParent = NULL); // standard constructor
38
39 // Dialog Data
40 //{{AFX_DATA(CRTSSSharedMemorySampleDlg)
41 enum { IDD = IDD_RTSSSHAREDMEMORYSAMPLE_DIALOG };
42 //}}AFX_DATA
43
44 // ClassWizard generated virtual function overrides
45 //{{AFX_VIRTUAL(CRTSSSharedMemorySampleDlg)
46 public:
47 virtual BOOL PreTranslateMessage(MSG* pMsg);
48 protected:
49 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
50 //}}AFX_VIRTUAL
51
52 // Implementation
53 protected:
54 void Refresh();
55
56 BOOL UpdateOSD(LPCSTR lpText);
57 void ReleaseOSD();
58
59 BOOL m_bMultiLineOutput;
60 BOOL m_bConnected;
61
62 HICON m_hIcon;
63 UINT m_nTimerID;
64
65 float CalcCpuUsage(DWORD dwCpu);
66
67 DWORD m_dwNumberOfProcessors;
68 NTQUERYSYSTEMINFORMATION m_pNtQuerySystemInformation;
69
70 DWORD m_dwTickCount[MAX_CPU];
71 LARGE_INTEGER m_idleTime[MAX_CPU];
72 FLOAT m_fltUsage[MAX_CPU];
73
74 CFont m_font;
75 CRichEditCtrl m_richEditCtrl;
76
77 CString m_strStatus;
78 CString m_strInstallPath;
79
80 // Generated message map functions
81 //{{AFX_MSG(CRTSSSharedMemorySampleDlg)
82 virtual BOOL OnInitDialog();
83 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
84 afx_msg void OnPaint();
85 afx_msg HCURSOR OnQueryDragIcon();
86 afx_msg void OnTimer(UINT nIDEvent);
87 afx_msg void OnDestroy();
88 //}}AFX_MSG
89 DECLARE_MESSAGE_MAP()
90 };
91 /////////////////////////////////////////////////////////////////////////////
92 //{{AFX_INSERT_LOCATION}}
93 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
94 /////////////////////////////////////////////////////////////////////////////
95 #endif
96 /////////////////////////////////////////////////////////////////////////////

  ViewVC Help
Powered by ViewVC 1.1.22