亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? vcmon.c

?? 磁盤工具
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
//----------------------------------------------------------------------
//
// VCMON.C: Disk Cache Monitor for Windows 95.
//
// Copyright (c) 1996 by Mark Russinovich and Bryce Cogswell
//
//----------------------------------------------------------------------
#include <windows.h>
#include <stdio.h>
#include <process.h>
#include <commctrl.h>
#include "resource.h"  
#include "vxd\stats.h"

//----------------------------------------------------------------------
//
// typedefs
//
//----------------------------------------------------------------------

// this data structure contains all the relevant information about
// a graph
typedef struct {
	int			graphstat;		// is graph on or off?

	// related to our parent and our checkbox
	HWND		graphdlg;		// our parent dialog
	int			buttonid;		// control button id for us

	// our stuff
	HWND		graphwnd;		// window handle
	int			graphwidth;		// width of graph (in pixels)
	int			graphheight;	// height of graph (in pixels)
	int			halfheight[2];	// height of subgraphs (in pixels)
	BITMAP		graphbmp;		// graph bitmap
	HBITMAP		hgraphbmp;
	BITMAP		legendbmp;		// legend bitmap
	HBITMAP		hlegendbmp;
	BITMAP		axisbmp;		// axis bitmap
	HBITMAP		haxisbmp;	
	int			numplots;		// number of things plotted on graph
	char		graphtitle[64]; // window title
	char		titles[2][64];	// line titles

	// numeric values
	double		highpty[2];		// highest value on graph
	long		highptx[2];		// x-coord of highest value
	double		xaxis[2];		// real value of x-axis
	long		xval;			// current x value
	long		yprev[2];		// previous y value
	double		*yval[2];		// y values on entire graph
} graphdata;


//----------------------------------------------------------------------
//
// defines
//
//----------------------------------------------------------------------

// name of vxd to connect with
#define	VXD_NAME		"\\\\.\\VCMON.VXD"

// color definitions
#define MYBLACK 		PALETTERGB( 0, 0, 0 )
#define MYGRAY			PALETTERGB( 0x80, 0x80, 0x80 )
#define MYWHITE			PALETTERGB( 0xFF, 0xFF, 0xFF )
#define MYBLUE  		PALETTERGB( 0, 0, 0xFF )
#define MYRED			PALETTERGB( 0xFF, 0, 0 )

// graph background color
#define GRAPHBKGRND		GetStockObject( LTGRAY_BRUSH )

// initial size of graph windows
#define GRAPHWIDTH 		450
#define GRAPHHEIGHT		300

// number of points ahead of current one that we clear
#define CLEARAHEAD		20

// distance away from checkbox that graph appears
#define XGRAPHSPACE		20
#define YGRAPHSPACE		20

// indexes into the graph array
#define NUMGRAPHS		6
#define SIZEINDEX		0
#define HITINDEX		1
#define	HOLDINDEX		2
#define	NEWINDEX		3
#define PGFLTINDEX		4
#define REPINDEX		5


//----------------------------------------------------------------------
//
// globals
//
//----------------------------------------------------------------------

// sample rate for getting info from VxD
DWORD				SampleRate = 500; // default == 0.5 second


// VxD related globals
HANDLE				VxDHandle = INVALID_HANDLE_VALUE;
OVERLAPPED  		Ovrlp = {0,0,0,0,0};
VcmonStatus_s		*Stats_p;
VcmonStatus_s		CurStats, LastStats;

// general windows things
static char			msgbuf[ 2048 ];
static HINSTANCE	hInst;

// pens for graph drawing
HPEN				BluePen, RedPen, BlackPen, WhitePen, GrayPen;

// indicates id of new graph being created
int					NewGraph;

// window handle of main dialog
HWND				hMainDlg;

// graphs				 
graphdata			Graph[NUMGRAPHS];
HANDLE				DrawCrit;

// font info
TEXTMETRIC 			FontTM;
LOGFONT    			LogFont;	
HFONT 				hFont = (HFONT) NULL;


//----------------------------------------------------------------------
//  
// Abort
//
// If there is a fatal problem, pop up a message box and die. Assumes
// that it is called from the dialog box.
//
//----------------------------------------------------------------------
void Abort( HWND hWnd, char * Msg )
{
	MessageBox( hWnd, Msg, "VCache Monitor", MB_OK );
	EndDialog( hWnd, 1 );
	PostQuitMessage( 1 );
}


//----------------------------------------------------------------------
//  
// centerWindow
// 
// Centers the Window on the screen.
//
//----------------------------------------------------------------------
VOID centerWindow( HWND hDlg )
{
	RECT            aRt;

	// center the dialog box
	GetWindowRect( hDlg, &aRt );
	OffsetRect( &aRt, -aRt.left, -aRt.top );
	MoveWindow( hDlg,
			((GetSystemMetrics( SM_CXSCREEN ) -
				aRt.right ) / 2 + 4) & ~7,
  			(GetSystemMetrics( SM_CYSCREEN ) -
				aRt.bottom) / 2,
			aRt.right, aRt.bottom, 0 );
}


//----------------------------------------------------------------------
//  
// AboutDlgProc
//
// Pops up the standard About dialog box.
//
//----------------------------------------------------------------------
BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, UINT wParam,
                       		LONG lParam) {
	switch (message) {
	case WM_INITDIALOG :
		// center the dialog
		centerWindow( hDlg );
		return TRUE ;
 
	case WM_COMMAND :
		switch (wParam) {

		case IDOK :
			EndDialog (hDlg, 0) ;
			return TRUE ;
		}
		break; 

	case WM_CLOSE:	
		EndDialog (hDlg, 0);
		return TRUE;
	}
	return FALSE ;
}


//----------------------------------------------------------------------
//  
// SliderDlgProc
//
// Pops up a dialog with a slider that is used to set the sample
// frequency.
//
//----------------------------------------------------------------------
BOOL CALLBACK SliderDlgProc (HWND hDlg, UINT message, UINT wParam,
                       		LONG lParam) {
	DWORD			NewRate;
	static HWND		hwndTrack;

	switch (message) {
	case WM_INITDIALOG :
		// center the dialog
		centerWindow( hDlg );

		// initialize the trackbar
		hwndTrack = GetDlgItem( hDlg, IDC_SLIDE ); 

		// 10 ticks so 1 == .5 seconds
		SendMessage(hwndTrack, TBM_SETRANGE, 
	        (WPARAM) TRUE,                
	        (LPARAM) MAKELONG(0, 10));

		// place one tick every 1 second
		SendMessage(hwndTrack, TBM_SETTICFREQ, 
	        (WPARAM) 2,                  
	        (LPARAM) 0 );

		// move slider to current sample rate
		SendMessage(hwndTrack, TBM_SETPOS, 
        	(WPARAM) TRUE,                   
        	(LPARAM) SampleRate/500); 
		return TRUE ;

	case WM_HSCROLL:
		switch( LOWORD(wParam) ) {
		case TB_ENDTRACK:
			// don't let an illegal value get through
            NewRate = SendMessage(hwndTrack, TBM_GETPOS, 0, 0);
            if( NewRate < 1 )
				SendMessage(hwndTrack, TBM_SETPOS, 
                    (WPARAM) TRUE,  
                    (LPARAM) 1); 
			break;
		}
		break;
 
	case WM_COMMAND :
		switch (wParam) {
		case IDOK:
			// set new sample rate
			SampleRate = SendMessage(hwndTrack, TBM_GETPOS, 0, 0) * 500;

			// tell VxD to change rate
			if ( ! DeviceIoControl(	VxDHandle, VCMON_SETRATE,
						&SampleRate, sizeof( SampleRate ), NULL, 0,  
						NULL, NULL ) ) {
				wsprintf( msgbuf, "Can't set rate with %s.", VXD_NAME );
				Abort( hDlg, msgbuf );
				return FALSE;
			}
			EndDialog( hDlg, 0);
			return TRUE;

		case IDCANCEL:
			EndDialog( hDlg, 0 );
			return TRUE ;			
		}
		break; 

	case WM_CLOSE:	
		EndDialog (hDlg, 0);
		return TRUE;
	}
	return FALSE ;
}


//----------------------------------------------------------------------
//
// FillStock
// 
// Fills a rectangle with the specified color.
//
//----------------------------------------------------------------------
void FillStock( HDC hDC, RECT *rc, int color )
{
	HBRUSH		hbrBkGnd;

	hbrBkGnd 	= GetStockObject( color );
    FillRect( hDC, rc, hbrBkGnd);
    DeleteObject( hbrBkGnd );
}


//----------------------------------------------------------------------
//  
// DrawSeperator
//
// Draws the 3-d lines seperating the graph from the upper and lower
// parts of the window
//
//----------------------------------------------------------------------
void DrawSeperator( HDC hDC, long top, long width )
{
	// white line
	SelectObject( hDC, WhitePen );
	MoveToEx( hDC, 0, top + 1, NULL );
	LineTo( hDC, width, top + 1 );

	// gray line
	SelectObject( hDC, GrayPen );
	MoveToEx( hDC, 0, top, NULL );
	LineTo( hDC, width , top );
}


//----------------------------------------------------------------------
//  
// DrawBitmap
//
// Draws the logo onto the dialog box. We have bitmaps for large and
// small font cases, but if the system is using an odd size we stretch
// the appropriate bitmap. Looks great for all the cases I tried.
//
//----------------------------------------------------------------------
void DrawBitmap (HDC hdc, HBITMAP hBitmap, short xStart, short yStart,
	int xLen, int yLen, int stretch )
{
     BITMAP    bm ;
     HDC       hdcMem ;
     POINT     ptSize, ptOrg , ptBSize;

     hdcMem = CreateCompatibleDC (hdc) ;
     SelectObject (hdcMem, hBitmap) ;
     SetMapMode (hdcMem, GetMapMode (hdc)) ;

     GetObject (hBitmap, sizeof (BITMAP), (LPSTR) &bm) ;
     ptSize.x = xLen; 
     ptSize.y = yLen; 
     DPtoLP (hdc, &ptSize, 1) ;

     ptOrg.x = 0 ;
     ptOrg.y = 0 ;
     DPtoLP (hdcMem, &ptOrg, 1) ;

	 ptBSize.x = bm.bmWidth;
	 ptBSize.y = bm.bmHeight;
	 DPtoLP (hdcMem, &ptBSize, 1);

	 if((ptSize.x < ptBSize.x - 10) || (ptSize.x > ptBSize.x) || stretch)
	 	StretchBlt (hdc, xStart, yStart, ptSize.x, ptSize.y,
	 		hdcMem, ptOrg.x, ptOrg.y, ptBSize.x, ptBSize.y, SRCCOPY);
	 else
	 	BitBlt (hdc, xStart, yStart, ptSize.x, ptSize.y,
     		hdcMem, ptOrg.x, ptOrg.y, SRCCOPY) ;

     DeleteDC (hdcMem) ;
}


//----------------------------------------------------------------------
//
// NewHightPt
//
// If we get a new high point for the graph, we have to reset the
// label bitmap
//
//----------------------------------------------------------------------
void NewHighPt( graphdata *mygraph )
{
	HDC				hdcMem, hDC;
	HBITMAP			oldbitmap;
	HFONT      		hOldFont = NULL;
	RECT			rc;
	char			tmp[64];

   	// prepare for drawing on bitmap
	hDC = GetDC( mygraph->graphwnd );
	hdcMem = CreateCompatibleDC (hDC) ;

	DeleteObject( mygraph->haxisbmp );
	mygraph->haxisbmp = CreateCompatibleBitmap( hDC, 
								mygraph->graphwidth,
								FontTM.tmHeight );
	GetObject( mygraph->haxisbmp, sizeof (BITMAP), 
							(LPSTR) &mygraph->axisbmp);
	oldbitmap = SelectObject( hdcMem, mygraph->haxisbmp );

	// fill bitmap with grey background	and draw seperator
	rc.top = 0;
	rc.left = 0;
	rc.bottom = mygraph->axisbmp.bmHeight;
	rc.right  = mygraph->axisbmp.bmWidth;
	FillStock( hdcMem, &rc, LTGRAY_BRUSH );
	DrawSeperator( hdcMem, mygraph->axisbmp.bmHeight - 2, 
					mygraph->axisbmp.bmWidth );

	// divide things up into different colors
	SetBkColor( hdcMem, GetSysColor(COLOR_BTNFACE));
	if (hFont) hOldFont = SelectObject( hdcMem, hFont);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清在线精品| 麻豆成人免费电影| 国产午夜亚洲精品理论片色戒 | 亚洲制服丝袜在线| 欧美xxxxx牲另类人与| 91丨九色丨黑人外教| 久久99在线观看| 亚洲午夜影视影院在线观看| 久久综合狠狠综合久久综合88 | 成人永久看片免费视频天堂| 99精品在线观看视频| 日本美女一区二区| 一区二区三区中文字幕电影| 国产欧美日韩在线观看| 欧美顶级少妇做爰| 成人性色生活片| 日韩女优av电影| 一区二区三区加勒比av| 日韩欧美在线123| 日韩二区三区在线观看| 亚洲视频在线一区观看| 久久精品亚洲精品国产欧美kt∨| 欧美丰满美乳xxx高潮www| 99久精品国产| 成人av网站在线观看| 国产九色sp调教91| 久久99精品久久久| 日本成人中文字幕| 五月激情综合婷婷| 亚洲综合在线观看视频| 1000精品久久久久久久久| 久久蜜桃一区二区| 欧美va日韩va| 精品国产一区二区三区不卡 | 风间由美一区二区三区在线观看| 久久精品国产一区二区三| 水野朝阳av一区二区三区| 91蜜桃在线观看| 国产剧情av麻豆香蕉精品| 国产校园另类小说区| 欧美精品一区二区三区在线播放| 日韩欧美成人一区| 日韩亚洲欧美在线观看| 欧美一区二区在线看| 欧美日韩高清一区二区三区| 欧美精品在线观看一区二区| 欧美日韩国产免费一区二区 | 日本一区二区视频在线| 国产色91在线| 国产精品美女久久久久久久久| 欧美激情艳妇裸体舞| 国产精品成人免费精品自在线观看 | 精品国内二区三区| 久久精品人人做人人爽人人| 中文字幕二三区不卡| 亚洲欧洲在线观看av| 一区二区三区免费看视频| 亚洲国产精品欧美一二99| 亚洲高清免费在线| 石原莉奈一区二区三区在线观看| 日本不卡一区二区三区高清视频| 日本系列欧美系列| 国产在线精品一区二区夜色| 成人中文字幕在线| 色综合天天综合网国产成人综合天 | 国产精品一二二区| kk眼镜猥琐国模调教系列一区二区| 91视频你懂的| 在线播放国产精品二区一二区四区| 日韩欧美一级精品久久| 国产日韩欧美精品一区| 亚洲精品国产成人久久av盗摄| 五月婷婷另类国产| 国产一区不卡精品| 色八戒一区二区三区| 91精品免费观看| 久久久午夜精品| 一区二区三区免费| 欧美一区二区三区系列电影| 久久精品免费在线观看| 欧美色图第一页| 91精品国产综合久久精品性色 | 久久精品日产第一区二区三区高清版 | 亚洲同性gay激情无套| 首页欧美精品中文字幕| 国产成人在线免费观看| 欧美性淫爽ww久久久久无| 日韩精品在线一区| 亚洲精品亚洲人成人网 | 国产成人免费在线| 欧美色区777第一页| 国产亚洲1区2区3区| 天天综合天天做天天综合| 国产suv精品一区二区三区| 欧美日韩视频一区二区| 日本一区二区三区dvd视频在线| 亚洲国产综合人成综合网站| 国产精品一区二区在线看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 亚洲国产日韩一区二区| 99久久精品国产一区二区三区| 激情小说亚洲一区| 激情深爱一区二区| 欧美亚洲高清一区| 国产精品人人做人人爽人人添| 日本不卡视频一二三区| 色中色一区二区| 国产网红主播福利一区二区| 日本vs亚洲vs韩国一区三区| 91黄视频在线观看| 国产日韩精品一区二区浪潮av | 欧美成人a视频| 亚洲国产毛片aaaaa无费看| 高清不卡在线观看| 精品日韩一区二区三区| 日韩精品久久理论片| 欧洲激情一区二区| 亚洲欧洲在线观看av| 国产ts人妖一区二区| 久久美女高清视频| 毛片av一区二区| 日韩亚洲欧美高清| 午夜国产精品一区| 精品1区2区3区| 一级日本不卡的影视| 色欧美片视频在线观看在线视频| 国产精品一级二级三级| 国产欧美精品一区二区色综合朱莉| 蜜臀国产一区二区三区在线播放| 亚洲欧美一区二区在线观看| 亚洲男人的天堂网| 波多野结衣中文一区| 欧美国产一区视频在线观看| 国产精品一二三区| 国产午夜一区二区三区| 国产成人午夜99999| 国产欧美一区二区精品性| 国产在线精品免费| 国产日产欧美一区| 国产成人精品午夜视频免费 | 久久久久久免费| 国产成人亚洲综合a∨婷婷| 久久久精品天堂| 成人午夜伦理影院| 中文字幕亚洲视频| 色av一区二区| 午夜伦理一区二区| 日韩免费在线观看| 国产一区二区三区不卡在线观看 | 色综合天天综合网天天看片| 亚洲欧美另类小说| 国产不卡视频在线观看| 国产馆精品极品| 国产91在线看| 波多野结衣一区二区三区| 99这里只有久久精品视频| 精品国产区一区| 久久一夜天堂av一区二区三区| 精品在线视频一区| 国产欧美精品一区aⅴ影院| 床上的激情91.| 一区二区三区自拍| 欧美一卡二卡三卡四卡| 国产精品白丝jk黑袜喷水| 中文字幕一区二区三区乱码在线 | 一区二区三区在线观看网站| 欧美日韩中文一区| 久久精品国产99久久6| 国产欧美日韩三级| 91最新地址在线播放| 午夜在线成人av| 国产网站一区二区| 欧美色涩在线第一页| 激情亚洲综合在线| 亚洲黄一区二区三区| 日韩午夜精品电影| 97精品电影院| 精品制服美女丁香| 中文字幕中文在线不卡住| 精品卡一卡二卡三卡四在线| 精品国产人成亚洲区| 成人欧美一区二区三区黑人麻豆 | 国产人成一区二区三区影院| 99久久99久久免费精品蜜臀| 三级亚洲高清视频| 欧美激情在线免费观看| 欧美一a一片一级一片| 美女精品一区二区| 亚洲欧洲制服丝袜| 正在播放一区二区| 午夜精品视频一区| 国产人久久人人人人爽| 欧美日韩一区二区在线视频| 国产酒店精品激情| 日韩高清一区二区| 最新国产成人在线观看| 精品成人佐山爱一区二区| 欧美视频精品在线观看| 粉嫩绯色av一区二区在线观看| 日韩不卡一区二区三区|