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

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

?? filemon.c

?? Socket異步通信示程序代碼下載.非常直觀
?? C
?? 第 1 頁 / 共 4 頁
字號:
/******************************************************************************
*
*	FUNCTION:	PopFindDialog:
*
*	PURPOSE:	Calls the find message dialog box.
*
*****************************************************************************/
void PopFindDialog(HWND hWnd)
{
	wcscpy( FindString, PrevMatchString );
    FindTextInfo.lStructSize = sizeof( FindTextInfo );
    FindTextInfo.hwndOwner = hWnd;
    FindTextInfo.hInstance = (HANDLE)hInst;
    FindTextInfo.lpstrFindWhat = FindString;
    FindTextInfo.lpstrReplaceWith = NULL;
    FindTextInfo.wFindWhatLen = sizeof(FindString);
    FindTextInfo.wReplaceWithLen = 0;
    FindTextInfo.lCustData = 0;
    FindTextInfo.Flags =  FindFlags;
    FindTextInfo.lpfnHook = (LPFRHOOKPROC)(FARPROC)NULL;
    FindTextInfo.lpTemplateName = NULL;

    if ((hWndFind = FindText(&FindTextInfo)) == NULL)
		MessageBox( hWnd, _T("Unable to create Find dialog"), APPNAME, MB_OK|MB_ICONERROR );      
}

/****************************************************************************
*
*	FUNCTION:	FilterProc
*
*	PURPOSE:	Processes messages for "Filter" dialog box
*
****************************************************************************/
BOOL APIENTRY FilterProc( HWND hDlg, UINT message, UINT wParam, LONG lParam )
{
	int				nb;
	DWORD			newMaxLines;
	FILTER			upcaseFilter;
	char			history[64];

	switch ( message )  {
	case WM_INITDIALOG:

		// initialize the controls to reflect the current filter
		SetDlgItemTextA( hDlg, IDC_PROCFILTER, FilterDefinition.processfilter );
		SetDlgItemTextA( hDlg, IDC_PROCEXCLUDE, FilterDefinition.excludeprocess );
		SetDlgItemTextA( hDlg, IDC_PATHFILTER, FilterDefinition.pathfilter );
		SetDlgItemTextA( hDlg, IDC_EXCLUDEFILTER, FilterDefinition.excludefilter );
		CheckDlgButton( hDlg, IDC_FILTERREADS, FilterDefinition.logreads );
		CheckDlgButton( hDlg, IDC_FILTERWRITES,FilterDefinition.logwrites );
		sprintf( history, "%d", MaxLines );
		SetDlgItemTextA( hDlg, IDC_HISTORY, history );
		return TRUE;

	case WM_COMMAND:              
		if ( LOWORD( wParam ) == IDOK )	 {

			// make sure that max lines is legal
			GetDlgItemTextA( hDlg, IDC_HISTORY, history, 64 );
			if( !sscanf( history, "%d", &newMaxLines )) {

				MessageBox(	NULL, _T("Invalid History Depth."),
						_T("Filter Error"), MB_OK|MB_ICONWARNING );
				return TRUE;
			} 
			MaxLines = newMaxLines;

			// read the values that were set
			GetDlgItemTextA( hDlg, IDC_PROCFILTER, FilterDefinition.processfilter, MAXFILTERLEN );
			GetDlgItemTextA( hDlg, IDC_PROCEXCLUDE, FilterDefinition.excludeprocess, MAXFILTERLEN );
			GetDlgItemTextA( hDlg, IDC_PATHFILTER, FilterDefinition.pathfilter, MAXFILTERLEN );
			GetDlgItemTextA( hDlg, IDC_EXCLUDEFILTER, FilterDefinition.excludefilter, MAXFILTERLEN );
			FilterDefinition.logreads  = IsDlgButtonChecked( hDlg, IDC_FILTERREADS );
			FilterDefinition.logwrites = IsDlgButtonChecked( hDlg, IDC_FILTERWRITES );

			// make an upcase version for the driver
			upcaseFilter = FilterDefinition;
			_strupr(upcaseFilter.processfilter);
			_strupr(upcaseFilter.excludeprocess);
			_strupr(upcaseFilter.pathfilter);
			_strupr(upcaseFilter.excludefilter);
 
			// tell the driver the new filter
			if ( ! DeviceIoControl(	sys_handle, FILEMON_setfilter,
									&upcaseFilter, sizeof(FILTER), NULL, 
									0, &nb, NULL ) )
			{
				Abort( hDlg, _T("Couldn't access device driver") );
				return TRUE;
			}

			EndDialog( hDlg, TRUE );
			return TRUE;

		} else if( LOWORD( wParam ) == IDCANCEL ) {

			EndDialog( hDlg, TRUE );
		} else if( LOWORD( wParam ) == IDRESET ) {

			// reset filter to default of none
			sprintf( FilterDefinition.processfilter, "*" );
			sprintf( FilterDefinition.excludeprocess, "" );
			sprintf( FilterDefinition.pathfilter, "*" );
			sprintf( FilterDefinition.excludefilter, "");
			FilterDefinition.logreads = TRUE;
			FilterDefinition.logwrites = TRUE;
			MaxLines = 0;

			// initialize the controls to reflect the current filter
			SetDlgItemTextA( hDlg, IDC_PROCFILTER, FilterDefinition.processfilter );
			SetDlgItemTextA( hDlg, IDC_PROCEXCLUDE, FilterDefinition.excludeprocess );
			SetDlgItemTextA( hDlg, IDC_PATHFILTER, FilterDefinition.pathfilter );
			SetDlgItemTextA( hDlg, IDC_EXCLUDEFILTER, FilterDefinition.excludefilter );
			CheckDlgButton( hDlg, IDC_FILTERREADS, FilterDefinition.logreads );
			CheckDlgButton( hDlg, IDC_FILTERWRITES, FilterDefinition.logwrites );
			SetDlgItemTextA( hDlg, IDC_HISTORY, "0" );
		}
		break;

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

/******************************************************************************
*
*	FUNCTION:	Get_Position_Settings
*
*	PURPOSE:	Reads the Registry to get the last-set window position.
*
******************************************************************************/
VOID Get_Position_Settings()
{
	HKEY	hKey;
	DWORD	ParamSize;
	POSITION_SETTINGS	regPositionInfo;

	// Fist, set the default settings
	PositionInfo.top	= CW_USEDEFAULT;
	PositionInfo.left	= CW_USEDEFAULT;
	PositionInfo.width	= CW_USEDEFAULT;
	PositionInfo.height	= CW_USEDEFAULT;
	PositionInfo.maximized = FALSE;

	// set the default listview widths
	PositionInfo.column[0] = 35;  // seq 
	PositionInfo.column[1] = 90;  // time
	PositionInfo.column[2] = 90;  // process
	PositionInfo.column[3] = 130; // irp
	PositionInfo.column[4] = 200; // path
	PositionInfo.column[5] = 70;  // result
	PositionInfo.column[6] = 150; // other

	// intialize the hooked drives
	PositionInfo.curdriveset = (DWORD) -1;

	// duration is default
	PositionInfo.timeduration = FALSE;

	// initialize history depth
	PositionInfo.historydepth = 0;

	// initialize filter
	strcpy( PositionInfo.filter.processfilter, "*" );
	strcpy( PositionInfo.filter.excludeprocess, "" );
	strcpy( PositionInfo.filter.pathfilter, "*" );
	strcpy( PositionInfo.filter.excludefilter, "" );
	PositionInfo.filter.logreads = TRUE;
	PositionInfo.filter.logwrites = TRUE;

	// first, get the last-entered params from the registry
	RegCreateKey(HKEY_CURRENT_USER, 
			_T("Software\\Systems Internals\\NTFilemon"),
			&hKey );

	// get the params and ignore errors
	ParamSize = sizeof( PositionInfo );
	RegQueryValueEx( hKey,_T("Settings"), NULL, NULL, (LPBYTE) &regPositionInfo,
				&ParamSize );
	RegCloseKey( hKey );

	// only use the registry settings if the version matches
	if( regPositionInfo.posversion == POSVERSION ) PositionInfo = regPositionInfo;

	// extract global settings from the value returned from the Registry (or the default)
	CurDriveSet			= PositionInfo.curdriveset;
	MaxLines			= PositionInfo.historydepth;
	TimeIsDuration		= PositionInfo.timeduration;
	FilterDefinition    = PositionInfo.filter;
}


/******************************************************************************
*
*	FUNCTION:	Save_Position_Settings
*
*	PURPOSE:	Saves the current window settings to the Registry.
*
******************************************************************************/
VOID Save_Position_Settings( HWND hWnd )
{
	RECT		rc;
	int			i;
	HKEY		hKey;

	// set version #
	PositionInfo.posversion = POSVERSION;

	// get the position of the main window
	GetWindowRect( hWnd, &rc );
	if( !IsIconic( hWnd )) {

		PositionInfo.left = rc.left;
		PositionInfo.top = rc.top;
		PositionInfo.width = rc.right - rc.left;
		PositionInfo.height = rc.bottom - rc.top;
	} 
	PositionInfo.maximized = IsZoomed( hWnd );

	// get the history depth
	PositionInfo.historydepth = MaxLines;

	// get time format
	PositionInfo.timeduration = TimeIsDuration;

	// get the widths of the listview columns
#if GETPROCESS
	for( i = 0; i < NUMCOLUMNS; i++ ) {
#else
	for( i = 0; i < NUMCOLUMNS-1; i++ ) {
#endif
		PositionInfo.column[i] = ListView_GetColumnWidth( hWndList, i );
	}

	// save filters
	PositionInfo.filter = FilterDefinition;

	// get the current drive set
	PositionInfo.curdriveset = CurDriveSet;

	// save connection info to registry
	RegOpenKey(HKEY_CURRENT_USER, 
			_T("Software\\Systems Internals\\NTFilemon"),
			&hKey );
	RegSetValueEx( hKey, _T("Settings"), 0, REG_BINARY, (LPBYTE) &PositionInfo,
			sizeof( PositionInfo ) );
	RegCloseKey( hKey );
}


/******************************************************************************
*
*	FUNCTION:	Hook_Drives
*
*	PURPOSE:	Hook the currently selected drives, updating menu checks
*
******************************************************************************/
DWORD Hook_Drives( HMENU DriveMenu, DWORD MaxDriveSet, DWORD CurDriveSet ) 
{
	DWORD nb;
	DWORD drive;

	// Tell device driver which drives to monitor
	if ( ! DeviceIoControl(	sys_handle, FILEMON_setdrives,
							&CurDriveSet, sizeof CurDriveSet,
							&CurDriveSet, sizeof CurDriveSet,
							&nb, NULL ) )
		return 0;

	// Update menu items
	for ( drive = 0; drive < 32; ++drive )
		if ( MaxDriveSet & (1<<drive) )  {
			if ( CurDriveSet & (1<<drive) )
				CheckMenuItem( DriveMenu, IDC_DRIVE+drive, MF_BYCOMMAND|MF_CHECKED );
			else
				CheckMenuItem( DriveMenu, IDC_DRIVE+drive, MF_BYCOMMAND|MF_UNCHECKED );
		}
	return CurDriveSet;
}


/******************************************************************************
*
*	FUNCTION:	Split
*
*	PURPOSE:	Split a delimited line into components
*
******************************************************************************/
int Split( char * line, char delimiter, char * items[] )
{
	int		cnt = 0;

	for (;;)  {
		// Add prefix to list of components		
		items[cnt++] = line;

		// Check for more components
		line = strchr( line, delimiter );
		if ( line == NULL )
			return cnt;

		// Terminate previous component and move to next
		*line++ = '\0';
	}		
}


/******************************************************************************
*
*	FUNCTION:	ListAppend
*
*	PURPOSE:	Add a new line to List window
*
******************************************************************************/
BOOL List_Append( HWND hWndList, DWORD seq, LONGLONG time, char * line )
{
	LV_ITEM		lvI;	// list view item structure
	int			row;
	char	*	items[20];
	int			itemcnt = 0;
	FILETIME	localTime;
	SYSTEMTIME	systemTime;

	// Split line into columns
	itemcnt = Split( line, '\t', items );
	if ( itemcnt == 0 )
		return TRUE;

	// Determine row number for request
	if ( *items[0] )  {
		// Its a new request.  Put at end.
		row = 0x7FFFFFFF;
	} else {
		// Its a status.  Locate its associated request.
		lvI.mask = LVIF_PARAM;
		lvI.iSubItem = 0;
		for ( row = ListView_GetItemCount(hWndList) - 1; row >= 0; --row )  {
			lvI.iItem = row;
			if ( ListView_GetItem( hWndList, &lvI )  &&  (DWORD)lvI.lParam == seq )
				break;
		}
		if ( row == -1 )
			// No request associated with status.
			return TRUE;
	}

	// Sequence number if a new item
	if ( *items[0] )  {
		wsprintf( msgbuf, _T("%d"), seq );
		lvI.mask		= LVIF_TEXT | LVIF_PARAM;
		lvI.iItem		= row;
		lvI.iSubItem	= 0;
		lvI.pszText		= msgbuf;
		lvI.cchTextMax	= lstrlen( lvI.pszText ) + 1;
		lvI.lParam		= seq;
		row = ListView_InsertItem( hWndList, &lvI );
		if ( row == -1 )  {
			wsprintf( msgbuf, _T("Error adding item %d to list view"), seq );
			MessageBox( hWndList, msgbuf, APPNAME, MB_OK|MB_ICONERROR );
			return FALSE;
		}
        LastRow = row;
	}

	// Time - note: in order to save space in the log records
	// I convert all times read to date/times and, based on whether
	// the year is reasonable, chose to interpret the time as 
	// a timestamp or a duration.
	FileTimeToLocalFileTime( (PFILETIME) &time, &localTime );
	FileTimeToSystemTime( &localTime, &systemTime );

	if( systemTime.wYear < 1998 || systemTime.wYear > 2100 ) {

		swprintf( msgbuf, _T("%10.8f"), (((float) time) /
								  ((float) PerfFrequency.QuadPart)) );
	} else {

		GetTimeFormat( LOCALE_USER_DEFAULT, 0,
						&systemTime, NULL, msgbuf, 64 );
	}
	ListView_SetItemText( hWndList, row, 1, msgbuf );

#if GETPROCESS
	// Process name
	if ( itemcnt>0 && *items[0] ) {
		OemToChar( items[0], msgbuf );
		ListView_SetItemText( hWndList, row, 2, msgbuf );
	}
#endif

	// Request type
	if ( itemcnt>1 && *items[1] )  {
		OemToChar( items[1], msgbuf );
		ListView_SetItemText( hWndList, row, 2+GETPROCESS, msgbuf );
	}

	// Path
	if ( itemcnt>2 && *items[2] )  {
		OemToChar( items[2], msgbuf );
		ListView_SetItemText( hWndList, row, 3+GETPROCESS, msgbuf );
	}

	// Result
	if ( itemcnt>4 && *items[4] )  {
		OemToChar( items[4], msgbuf );
		ListView_SetItemText( hWndList, row, 4+GETPROCESS, msgbuf );
	}

	// Additional
	if ( itemcnt>3 && *items[3] )  {
		OemToChar( items[3], msgbuf );
		ListView_SetItemText( hWndList, row, 5+GETPROCESS, msgbuf );
	}

	return TRUE;
}


/******************************************************************************
*
*	FUNCTION:	UpdateStatistics
*
*	PURPOSE:	Clear the statistics window and refill it with the current 
*				contents of the statistics buffer.  Does not refresh the 
*				buffer from the device driver.
*
******************************************************************************/
void UpdateStatistics( HWND hWnd, HWND hWndList, BOOL Clear )
{
	PENTRY	ptr;

	// Just return if nothing to do
	if ( !Clear  &&  StatsLen < sizeof(int)+2 )
		return;

	// Start with empty list
	if ( Clear ) {
		ListView_DeleteAllItems( hWndList );
		LastRow = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产免费| 日韩免费看的电影| 日产国产欧美视频一区精品| 日本一区二区免费在线| 欧美午夜精品久久久久久孕妇| 精品一区二区精品| 亚洲精品一卡二卡| 国产视频一区二区在线观看| 欧美剧情电影在线观看完整版免费励志电影 | 日韩免费视频一区二区| 91免费看片在线观看| 精品亚洲成a人| 五月综合激情网| 亚洲欧美日韩国产成人精品影院| 久久久www成人免费无遮挡大片| 欧美裸体bbwbbwbbw| 99久久精品情趣| 国产一区二区三区久久久| 亚洲成人av中文| 亚洲欧美怡红院| 国产欧美中文在线| 精品久久久久久久久久久院品网| 欧美三级电影在线看| 91麻豆免费观看| 成人av在线电影| 国产成人午夜视频| 精品中文字幕一区二区小辣椒| 日产国产高清一区二区三区| 午夜成人免费电影| 亚洲国产人成综合网站| 有码一区二区三区| 亚洲精品久久久久久国产精华液| 国产精品电影院| 亚洲视频综合在线| 国产精品久久久久久久久免费樱桃 | 亚洲视频一二三区| 中文字幕成人在线观看| 久久精品视频一区| 久久亚洲精华国产精华液 | 国产麻豆精品在线| 黑人精品欧美一区二区蜜桃| 精品一区二区在线观看| 免费高清不卡av| 精品一区二区日韩| 国产激情一区二区三区| 国产成人综合视频| 成人开心网精品视频| av中文字幕一区| 91亚洲男人天堂| 在线免费观看不卡av| 精品视频一区三区九区| 欧美日本一区二区三区四区 | 国产清纯白嫩初高生在线观看91| 欧美激情中文不卡| 国产精品第13页| 亚洲欧美日韩在线不卡| 亚洲一级在线观看| 免费人成在线不卡| 国产成人精品网址| 91看片淫黄大片一级在线观看| 欧美性生活大片视频| 91精品久久久久久蜜臀| 久久久国产综合精品女国产盗摄| 国产精品情趣视频| 亚洲狠狠爱一区二区三区| 天天综合网 天天综合色| 久久99日本精品| av综合在线播放| 欧美日韩精品免费观看视频 | 精品国产乱子伦一区| 欧美激情一区二区三区蜜桃视频| 一区二区三区四区av| 奇米四色…亚洲| 国产一区二区女| 粉嫩久久99精品久久久久久夜 | 欧美在线啊v一区| 欧美日韩精品免费观看视频| 欧美一级片在线| www国产亚洲精品久久麻豆| 国产无一区二区| 久久久久久亚洲综合| 国产精品无遮挡| 亚洲欧美视频在线观看视频| 午夜久久久影院| 美女视频黄频大全不卡视频在线播放 | 91九色02白丝porn| 欧美日韩www| 久久久99精品免费观看不卡| 亚洲午夜电影网| 久久福利视频一区二区| 成人97人人超碰人人99| 欧美系列日韩一区| www国产精品av| 一区二区三区欧美| 日本aⅴ亚洲精品中文乱码| 国产成人欧美日韩在线电影| 在线精品视频免费播放| 日韩欧美视频一区| 久久色在线观看| 亚洲综合免费观看高清完整版| 久久精品噜噜噜成人88aⅴ| 成人av免费在线| 欧美一区二区视频在线观看| 中文字幕乱码亚洲精品一区| 首页亚洲欧美制服丝腿| 国内精品久久久久影院薰衣草 | 国产一区二区在线观看免费| 色哟哟一区二区在线观看| 69久久夜色精品国产69蝌蚪网| 欧美国产一区二区| 亚洲成人福利片| 成人污污视频在线观看| 日韩精品中文字幕一区二区三区| 亚洲区小说区图片区qvod| 精品制服美女丁香| 欧美性大战久久久| 国产日韩欧美精品综合| 日韩中文字幕一区二区三区| av电影一区二区| 日韩欧美美女一区二区三区| 亚洲六月丁香色婷婷综合久久 | 久久99精品久久久久婷婷| 在线欧美日韩国产| 欧美国产精品专区| 亚洲成人先锋电影| av毛片久久久久**hd| 国产视频一区不卡| 日韩**一区毛片| 欧美图区在线视频| 自拍偷拍欧美精品| 国产激情视频一区二区三区欧美| 26uuu精品一区二区| 视频在线观看一区二区三区| 在线精品亚洲一区二区不卡| 日韩一区中文字幕| 国产一区美女在线| 欧美白人最猛性xxxxx69交| 亚洲综合久久久| 欧美日本韩国一区二区三区视频| 亚洲乱码国产乱码精品精可以看 | 国产精品麻豆网站| 国产精品亚洲视频| 亚洲精品一区在线观看| 另类成人小视频在线| av午夜一区麻豆| 一区二区三区视频在线看| 99v久久综合狠狠综合久久| 国产欧美一区二区精品性| 激情偷乱视频一区二区三区| 欧美一区欧美二区| 日韩激情av在线| 欧美精品乱码久久久久久按摩| 香蕉影视欧美成人| 欧美男女性生活在线直播观看| 亚洲国产视频a| 欧美猛男男办公室激情| 午夜精品久久久| 日韩免费看的电影| 精品一二三四区| 久久午夜电影网| 国产精品 日产精品 欧美精品| 精品久久久久久久人人人人传媒| 懂色中文一区二区在线播放| 日韩亚洲欧美在线观看| 久久er精品视频| 中文字幕一区二区三区蜜月| 91猫先生在线| 青青草精品视频| 国产午夜精品一区二区| 色噜噜偷拍精品综合在线| 亚洲黄色片在线观看| 日韩一级片网址| 国产一区二区三区综合| 亚洲男同1069视频| 欧亚洲嫩模精品一区三区| 久久国产精品一区二区| 中文字幕免费在线观看视频一区| 精品视频在线视频| 美女爽到高潮91| 亚洲精品菠萝久久久久久久| 欧美二区三区91| 高清在线不卡av| 亚洲主播在线观看| 久久综合丝袜日本网| 99视频国产精品| 一区二区三区**美女毛片| 久久综合九色综合97_久久久| 99热99精品| 三级亚洲高清视频| 久久精品欧美一区二区三区不卡| 国产v日产∨综合v精品视频| 亚洲va国产天堂va久久en| 久久影音资源网| 一本大道久久a久久综合婷婷 | 国产综合久久久久久久久久久久| 一区二区三区精品久久久| 欧美精品123区| 91原创在线视频| 七七婷婷婷婷精品国产| 国产精品每日更新|