⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fgcommandlineinfo.cpp

📁 文件加密的过滤驱动程序源代码.
💻 CPP
字号:
// FGCommandLineInfo.cpp: implementation of the CFGCommandLineInfo class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "FileGuard.h"
#include "FileGuardApp.h"
#include "FGCommandLineInfo.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CFGCommandLineInfo::CFGCommandLineInfo()
{
	m_bIsOpenByRightKey=FALSE;
}

CFGCommandLineInfo::~CFGCommandLineInfo()
{

}

void CFGCommandLineInfo::ParsePath()
{
	//AfxMessageBox("Parsing path now!");

	if(m_bIsOpenByRightKey==FALSE || m_strFileName.IsEmpty())	return;

	if(m_protectedObjectType==DRIVE)
	{
		//remove char " .
		m_strFileName.Remove('"');
		if(m_strFileName.Right(1)!='\\')
			m_strFileName+="\\*";
	}
	else if(m_protectedObjectType==DIRECTORY)
	{
		m_strFileName+="\\*";
	}
	//else if((m_protectedObjectType==FILE)		needless to handle it.
}

void CFGCommandLineInfo::ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast)
{
	//AfxMessageBox(pszParam);

	//This param is passed from opening by right key.
	if(!lstrcmpi(pszParam,"directory"))
	{
		m_protectedObjectType=DIRECTORY;
		m_bIsOpenByRightKey=TRUE;
	}
	else if(!lstrcmpi(pszParam,"file"))	
	{
		m_protectedObjectType=FILE;
		m_bIsOpenByRightKey=TRUE;
	}
	else if(!lstrcmpi(pszParam,"drive"))
	{
		m_protectedObjectType=DRIVE;
		m_bIsOpenByRightKey=TRUE;
	}
	else if(!lstrcmpi(pszParam, "systemstartup"))
		bSysStartUp=TRUE;
	else if(pszParam[0]=='#')		//Get file name.(file name is between two '*'.)
		for(int i=1; pszParam[i]!='#' && i<=MAX_PATH; i++)
			m_strFileName+=pszParam[i]? pszParam[i]: ' ';        //change NULL char to white-space char.
	else if(!lstrcmpi(pszParam, "Watcher"))
		bWatcher=TRUE;

	CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
	return;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -