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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? filemon.c

?? Socket異步通信示程序代碼下載.非常直觀
?? C
?? 第 1 頁 / 共 4 頁
字號:
/******************************************************************************
*
*       FileMon - File System Monitor for Windows NT
*		
*		Copyright (c) 1996-1998 Mark Russinovich and Bryce Cogswell
*
*		See readme.txt for tersma and conditions.
*
*    	PROGRAM: FileMon.c
*
*    	PURPOSE: Communicates with the FileMon driver to display 
*		file system activity information.
*
******************************************************************************/
#include <windows.h>    // includes basic windows functionality
#include <windowsx.h>
#include <tchar.h>
#include <commctrl.h>   // includes the common control header
#include <stdio.h>
#include <string.h>
#include <winioctl.h>
#include "resource.h"
#include "ioctlcmd.h"

#include "instdrv.h"

// this typedef, present in newer system include files,
// supports the building filemon on older systems
typedef struct 
{
    DWORD cbSize;
    DWORD dwMajorVersion;
    DWORD dwMinorVersion;
    DWORD dwBuildNumber;
    DWORD dwPlatformID;
} DLLVERSIONINFO_, *PDLLVERSIONINFO_;

HRESULT (CALLBACK *pDllGetVersionProc)( PDLLVERSIONINFO_ pdvi );

// Set this to 0 for a non-processor specific version that does not get
// process names from the device driver
#define GETPROCESS 1

//
// Application name for message boxes
//
#define APPNAME			_T("Filemon")

// toolbar height plus the borders
#define TOOLBARHEIGHT	28

// Number of columns in the listview
#define NUMCOLUMNS	7

// Variables/definitions for the driver that performs the actual monitoring.
#define				SYS_FILE		_T("FILEMON.SYS")
#define				SYS_NAME		_T("FILEMON")
static HANDLE		sys_handle		= INVALID_HANDLE_VALUE;

// Drive type names
#define DRVUNKNOWN		0
#define DRVFIXED		1
#define DRVREMOTE		2
#define DRVRAM			3
#define DRVCD			4
#define DRVREMOVE		5
TCHAR DrvNames[][32] = {
	_T("UNKNOWN"),
	_T("FIXED"),
	_T("REMOTE"),
	_T("RAM"),
	_T("CD"),
	_T("REMOVEABLE"),
};	

#define POSVERSION 360

// Position settings data structure 
typedef struct {
	int		posversion;
	int		left;
	int		top;
	int		width;
	int		height;
	DWORD	column[NUMCOLUMNS];
	DWORD	curdriveset;
	DWORD	historydepth;
	BOOLEAN maximized;
	BOOLEAN timeduration;
	FILTER  filter;
} POSITION_SETTINGS;

// typedef for balloon popup
typedef struct {
	WCHAR	itemText[1024];
	POINT	itemPosition;
} ITEM_CLICK, *PITEM_CLICK;

// drives that are hooked
DWORD	CurDriveSet;

// The variable that holds the position settings
POSITION_SETTINGS	PositionInfo;

// toolbar constants
#define ID_TOOLBAR         1

// defined for comtl32.dll version 4.7
#define TOOLBAR_FLAT		0x800

// button definitions

// for installations that support flat style
TBBUTTON tbButtons[] = {
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 0, IDM_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 8, 0, 0, TBSTYLE_BUTTON, 0L, 0},
	{ 2, IDM_CAPTURE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 4, IDM_AUTOSCROLL, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 6, IDM_CLEAR, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 9, IDM_TIME, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0 },	
	{ 8, 0, 0, TBSTYLE_BUTTON, 0L, 0},
	{ 5, IDM_FILTER, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 8, 0, 0, TBSTYLE_BUTTON, 0L, 0},
	{ 7, IDM_FIND, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 8, 0, 0, TBSTYLE_BUTTON, 0L, 0},
};
#define NUMBUTTONS		13

// for older installations
TBBUTTON tbButtonsOld[] = {
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 0, IDM_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 2, IDM_CAPTURE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 4, IDM_AUTOSCROLL, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 6, IDM_CLEAR, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},	
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 9, IDM_TIME, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0 },	
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 5, IDM_FILTER, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
	{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
	{ 7, IDM_FIND, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0},
};

#define NUMBUTTONSOLD	12


// Buffer into which driver can copy statistics
char				Stats[ MAX_STORE ];
// Current fraction of buffer filled
DWORD				StatsLen;

// Search string
TCHAR				FindString[256];
FINDREPLACE			FindTextInfo;
DWORD				FindFlags = FR_DOWN;
BOOLEAN				PrevMatch;
TCHAR				PrevMatchString[256];				

// Application instance handle
HINSTANCE			hInst;

// Misc globals
HWND				hWndFind = NULL;
UINT				findMessageID;
HWND				hWndList;
HWND				hBalloon = NULL;
BOOLEAN				Capture = TRUE;
BOOLEAN				Autoscroll = TRUE;

// listview size limiting
DWORD				MaxLines = 0;
DWORD				LastRow = 0;

// is time absolute or duration?
BOOLEAN				TimeIsDuration;

// Filter-related
FILTER				FilterDefinition;

// For info saving
TCHAR				szFileName[256];
BOOLEAN				FileChosen = FALSE;

// General buffer for storing temporary strings
static TCHAR		msgbuf[ 257 ];

// General cursor manipulation
HCURSOR 			hSaveCursor;
HCURSOR 			hHourGlass;

// performance counter frequency
LARGE_INTEGER		PerfFrequency;


//functions
BOOL 				InitApplication( HANDLE );
HWND 				InitInstance( HANDLE, int );
DWORD 				Hook_Drives( HMENU DriveMenu, DWORD MaxDriveSet, DWORD CurDriveSet ); 
HWND 				CreateList( HWND );
void 				UpdateStatistics( HWND hWnd, HWND hWndList, BOOL Clear );
int 				CALLBACK ListCompareProc( LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort );
void				SaveFile( HWND hDlg, HWND listbox, BOOLEAN SaveAs );


/******************************************************************************
*
*	FUNCTION:	Abort:
*
*	PURPOSE:	Handles emergency exit conditions.
*
*****************************************************************************/
void Abort( HWND hWnd, TCHAR * Msg )
{
	LPVOID	lpMsgBuf;
	TCHAR	errmsg[256];
	DWORD	error = GetLastError();
 
	FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
					NULL, GetLastError(), 
					MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
					(LPTSTR) &lpMsgBuf, 0, NULL );
	UnloadDeviceDriver( SYS_NAME );
	wsprintf(errmsg, _T("%s: %s"), Msg, lpMsgBuf );
	if( error == ERROR_INVALID_HANDLE ) 
		wsprintf(errmsg, _T("%s\nMake sure that you are an administrator and that ")
			_T("Filemon is located on a local drive."), errmsg  );
	MessageBox( hWnd, errmsg, _T("Filemon"), MB_OK|MB_ICONERROR );
	PostQuitMessage( 1 );
	LocalFree( lpMsgBuf );
}

/******************************************************************************
*
*	FUNCTION:	BalloonDialog
*
*	PURPOSE:	Dialog function for home-brewed balloon help.
*
******************************************************************************/
LONG APIENTRY BalloonDialog( HWND hDlg, UINT message, UINT wParam, LONG lParam )
{
	static ITEM_CLICK	ctx;
	static RECT			rect;
	static HFONT		hfont;
	LPCREATESTRUCT		lpcs;
	HDC					hdc;
	LOGFONT				lf;

	switch (message) {
		case WM_CREATE:

			lpcs = (void *)lParam;
			ctx = *(PITEM_CLICK) lpcs->lpCreateParams;
			hdc = GetDC( hDlg );

			// Get font
			if ( hfont == NULL )  {
				GetObject( GetStockObject(SYSTEM_FONT), sizeof lf, &lf ); 
				lf.lfWeight = FW_NORMAL;
				lf.lfHeight = 8;
				lf.lfWidth  = 0;
				wcscpy( lf.lfFaceName, _T("MS Sans Serif") );
 				hfont = CreateFontIndirect( &lf ); 
			} 

			// Compute size of required rectangle
			rect.left	= 0;
			rect.top	= 0;
			rect.right	= lpcs->cx;
			rect.bottom	= lpcs->cy;
			SelectObject( hdc, hfont );
			DrawText( hdc, ctx.itemText, -1, &rect, 
						DT_NOCLIP|DT_LEFT|DT_NOPREFIX|DT_WORDBREAK|DT_CALCRECT );

			// Move and resize window
			if( ctx.itemPosition.x - 5 + rect.right + 10 >
				 GetSystemMetrics(SM_CXFULLSCREEN) ) {

				 ctx.itemPosition.x = GetSystemMetrics(SM_CXFULLSCREEN) -
							(rect.right+10-5);
			}
			MoveWindow( hDlg, 
						ctx.itemPosition.x-5, ctx.itemPosition.y+10, 
						rect.right + 10, 
						rect.bottom + 10,
						TRUE );

			// Adjust rectangle so text is centered
			rect.left	+= 5;
			rect.right	+= 5;
			rect.top	+= 5;
			rect.bottom	+= 5;
			break;

		case WM_PAINT:
			hdc = GetDC( hDlg );

			// Set colors
			SetTextColor( hdc, 0x00000000 );
			SetBkMode( hdc, TRANSPARENT );
			SelectObject( hdc, hfont );
			DrawText( hdc, ctx.itemText, -1, &rect, 
						DT_NOCLIP|DT_LEFT|DT_NOPREFIX|DT_WORDBREAK );
			break;

		case WM_MOUSEMOVE:
		case WM_CLOSE:	
			hBalloon = NULL;
			DestroyWindow( hDlg );
			break;
	}

    return DefWindowProc( hDlg, message, wParam, lParam );
}


/******************************************************************************
*
*	FUNCTION:	FindInListview:
*
*	PURPOSE:	Searches for a string in the listview. Note: its okay if
*				items are being added to the list view or the list view
*				is cleared while this search is in progress - the effect
*				is harmless.
*
*****************************************************************************/
BOOLEAN FindInListview(HWND hWnd, LPFINDREPLACE FindInfo )
{
	int		currentItem;
	DWORD	i;
	int		subitem, numItems;
	TCHAR	fieldtext[256];
	BOOLEAN match = FALSE;
	TCHAR	errmsg[256];
	BOOLEAN	goUp;

	// get the search direction
	goUp = ((FindInfo->Flags & FR_DOWN) == FR_DOWN);

	// initialize stuff
	if( !(numItems = ListView_GetItemCount( hWndList ))) {

		MessageBox( hWnd, _T("No items to search"), _T("Filemon"), 
			MB_OK|MB_ICONWARNING );
		return FALSE;
	}

	// find the item with the focus
	currentItem = ListView_GetNextItem( hWndList, 0, LVNI_SELECTED );

	// if no current item, start at the top or the bottom
	if( currentItem == -1 ) {
		if( goUp )
			currentItem = 0;
		else {
			if( PrevMatch ) {
				wsprintf(errmsg, _T("Cannot find string \"%s\""), FindInfo->lpstrFindWhat );
				MessageBox( hWnd, errmsg, _T("Filemon"), MB_OK|MB_ICONWARNING );
				return FALSE;
			}
			currentItem = numItems;
		}
	}

	// if we're continuing a search, start with the next item
	if( PrevMatch && !wcscmp( FindString, PrevMatchString ) ) {
		if( goUp ) currentItem++;
		else currentItem--;

		if( (!goUp && currentItem < 0) ||
			(goUp && currentItem >= numItems )) {

			wsprintf(errmsg, _T("Cannot find string \"%s\""), FindInfo->lpstrFindWhat );
			MessageBox( hWnd, errmsg, APPNAME, MB_OK|MB_ICONWARNING );
			return FALSE;
		}
	}

	// loop through each item looking for the string
	while( 1 ) {

		// get the item text
		for( subitem = 0; subitem < NUMCOLUMNS; subitem++ ) {
			fieldtext[0] = 0;
			ListView_GetItemText( hWndList, currentItem, subitem, fieldtext, 256 );

			// make sure enought string for a match
			if( wcslen( fieldtext ) < wcslen( FindInfo->lpstrFindWhat ))
				continue;

			// do a scan all the way through for the substring
			if( FindInfo->Flags & FR_WHOLEWORD ) {

				i = 0;
				while( fieldtext[i] ) {
					while( fieldtext[i] && fieldtext[i] != ' ' ) i++;
					if( FindInfo->Flags & FR_MATCHCASE ) 
						match = !wcscmp( fieldtext, FindInfo->lpstrFindWhat );
					else
						match = !wcsicmp( fieldtext, FindInfo->lpstrFindWhat );
					if( match) break;
					i++;
				}	
			} else {
				for( i = 0; i < wcslen( fieldtext ) - wcslen(FindInfo->lpstrFindWhat)+1; i++ ) {
					if( FindInfo->Flags & FR_MATCHCASE ) 
						match = !wcsncmp( &fieldtext[i], FindInfo->lpstrFindWhat, 
											wcslen(FindInfo->lpstrFindWhat) );
					else
						match = !wcsnicmp( &fieldtext[i], FindInfo->lpstrFindWhat,
											wcslen(FindInfo->lpstrFindWhat) );
					if( match ) break;
				}		
			}

			if( match ) {

				wcscpy( PrevMatchString, FindInfo->lpstrFindWhat );
				PrevMatch = TRUE;
				ListView_SetItemState( hWndList, currentItem, 
							LVIS_SELECTED|LVIS_FOCUSED,
							LVIS_SELECTED|LVIS_FOCUSED );
				ListView_EnsureVisible( hWndList, currentItem, FALSE ); 
				SetFocus( hWndList );
				return TRUE;
			}
		}
		currentItem = currentItem + (goUp ? 1:-1);
		if( !currentItem || currentItem == numItems+1 ) {
			// end of the road
			break;
		}
	}
	wsprintf(errmsg, _T("Cannot find string \"%s\""), FindInfo->lpstrFindWhat );
	MessageBox( hWnd, errmsg, APPNAME, MB_OK|MB_ICONWARNING );
	return FALSE;
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图丝袜美腿| 亚洲天堂免费在线观看视频| 91激情五月电影| av高清不卡在线| 风流少妇一区二区| 国产成人午夜视频| 99视频精品在线| 色综合久久中文字幕综合网| 91婷婷韩国欧美一区二区| 91在线看国产| 欧美美女黄视频| 日韩美女一区二区三区| 精品国产精品网麻豆系列| 26uuu亚洲综合色| 日韩美女精品在线| 亚洲最大成人综合| 琪琪久久久久日韩精品| 久久激五月天综合精品| 国v精品久久久网| 91色在线porny| 91.com视频| 国产亚洲一区二区三区四区| 日韩美女啊v在线免费观看| 亚洲成人自拍网| 国内精品伊人久久久久av影院 | 亚洲成av人影院| 日av在线不卡| 91丨九色porny丨蝌蚪| 欧美日韩精品电影| 久久久久久免费毛片精品| 亚洲女同一区二区| 免费成人在线视频观看| 不卡视频免费播放| 欧美丰满少妇xxxxx高潮对白| 精品国产乱码久久久久久影片| 国产精品三级久久久久三级| 亚洲国产美女搞黄色| 国产精品综合二区| 欧美综合欧美视频| 欧美国产欧美综合| 美女视频黄 久久| 99久久免费视频.com| 日韩丝袜美女视频| 亚洲激情图片小说视频| 国产一区二区三区四区五区美女| 色哟哟国产精品| 国产欧美一区二区三区鸳鸯浴| 偷拍一区二区三区四区| 色综合久久88色综合天天6| 久久亚洲一级片| 五月激情丁香一区二区三区| av网站一区二区三区| 久久综合狠狠综合久久综合88 | 视频一区在线视频| 成人免费毛片aaaaa**| 欧美日韩国产乱码电影| 又紧又大又爽精品一区二区| 国产成人免费在线观看| 日韩免费视频一区二区| 日韩专区欧美专区| 欧美在线综合视频| 亚洲色图在线播放| 99re视频精品| 亚洲欧美影音先锋| av电影在线观看完整版一区二区| 国产日韩欧美在线一区| 麻豆免费看一区二区三区| 欧美伦理影视网| 视频一区中文字幕国产| 欧美人与禽zozo性伦| 亚洲国产精品一区二区www| 在线观看日韩精品| 一二三区精品福利视频| 在线国产亚洲欧美| 国产精品成人网| 波多野洁衣一区| 亚洲视频小说图片| 色欧美88888久久久久久影院| 中文字幕在线不卡一区| 色哟哟日韩精品| 一区二区三区成人在线视频| 在线观看国产精品网站| 亚洲第一狼人社区| 欧美大度的电影原声| 国产专区欧美精品| 国产精品欧美一区喷水| 91农村精品一区二区在线| 尤物av一区二区| 欧美浪妇xxxx高跟鞋交| 日韩成人dvd| 久久久久久日产精品| 成人黄色国产精品网站大全在线免费观看 | 99久久精品免费精品国产| 综合久久一区二区三区| 欧美亚洲一区二区在线| 免费美女久久99| 久久精品视频免费观看| 日本福利一区二区| 日韩精品一级中文字幕精品视频免费观看 | 亚洲精品在线电影| 成人黄页毛片网站| 亚洲高清免费一级二级三级| 日韩欧美高清一区| av在线这里只有精品| 午夜精品福利一区二区三区av| 精品久久久久久综合日本欧美| 懂色av一区二区三区蜜臀| 亚洲激情六月丁香| 精品久久久三级丝袜| 在线看不卡av| 大陆成人av片| 亚洲一区二区三区四区五区中文| 欧美草草影院在线视频| 91亚洲精品久久久蜜桃网站| 免费不卡在线视频| 亚洲视频小说图片| 久久精品视频在线看| 精品视频在线免费| 粉嫩aⅴ一区二区三区四区| 亚洲成年人网站在线观看| 中文字幕不卡在线观看| 91精品国产91久久久久久一区二区| 国产精品综合二区| 青青草国产精品亚洲专区无| 亚洲日本va午夜在线电影| 精品播放一区二区| 欧美日韩一级黄| 97se亚洲国产综合自在线| 狠狠色2019综合网| 性欧美疯狂xxxxbbbb| 综合久久久久久| 国产精品伦理一区二区| 国产校园另类小说区| 欧美一区中文字幕| 欧美日韩一区成人| 欧美日韩午夜在线| 欧美色手机在线观看| 色8久久精品久久久久久蜜| 成人免费va视频| 国产精品18久久久久久久久 | 国产福利精品一区| 精品中文字幕一区二区小辣椒| 亚洲综合在线免费观看| 国产精品久久久久桃色tv| 久久精品一区蜜桃臀影院| 精品成人免费观看| 久久日韩精品一区二区五区| 欧美一级夜夜爽| 在线播放视频一区| 日韩一区二区三区电影在线观看 | 精品伊人久久久久7777人| 香港成人在线视频| 日本在线观看不卡视频| 日本欧美一区二区| 黄网站免费久久| 懂色av中文字幕一区二区三区| 国产精品综合在线视频| 国产真实乱对白精彩久久| 国产精品538一区二区在线| 成人黄色软件下载| 91免费在线播放| 欧美日韩高清一区二区不卡 | 久久99精品久久久久久久久久久久 | 欧美日韩三级视频| 91精品国产综合久久蜜臀| 宅男噜噜噜66一区二区66| 欧美一区二区三区四区久久| 日韩美女视频在线| 国产丝袜欧美中文另类| 亚洲少妇中出一区| 婷婷久久综合九色综合伊人色| 午夜精品福利久久久| 久久精品国产第一区二区三区| 精品中文字幕一区二区小辣椒| 成人永久免费视频| 在线国产亚洲欧美| 久久亚洲综合av| 亚洲男同性恋视频| 免费不卡在线观看| 成人av网站在线观看| 欧美日韩国产中文| 日韩一区二区免费在线电影| 欧美国产一区在线| 首页综合国产亚洲丝袜| 国产美女娇喘av呻吟久久| 91免费版在线看| 日韩欧美亚洲一区二区| 亚洲三级理论片| 国产裸体歌舞团一区二区| 91美女在线看| 久久久另类综合| 五月婷婷激情综合| hitomi一区二区三区精品| 日韩女优电影在线观看| 亚洲综合一区二区精品导航| 久久99热99| 欧美喷水一区二区| 日韩美女久久久| 国产91丝袜在线18| 欧美一区二区三区在线电影|