📄 hide_fat32.cpp
字号:
// Hide_FAT32.cpp: implementation of the Hide_FAT32 class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "FS.h"
#include "Hide_FAT32.h"
#include <afxtempl.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Hide_FAT32::Hide_FAT32(char sPath[]):FAT((const char*)sPath)
{
int n=strlen(sPath);
pPath=new char[n];
if(!pPath)
{
MessageBox(NULL,"隐藏失败(内存分配错误)","错误",MB_ICONSTOP);;
}
CopyElements(pPath,sPath,n);
if(pPath[n-1]==0x5C)
{
pPath[n-1]=0;
}
}
Hide_FAT32::~Hide_FAT32()
{
if(pPath)
{
delete[] pPath;
}
}
BOOL Hide_FAT32::Hide(int Flag)//set Flag for use in Show()
{
Directory_FAT EntryContent;
if(!GetEntryContent(pPath,EntryContent))
{
return FALSE;
}
EntryContent.Volume=Flag;
EntryContent.Archives=0;
EntryContent.Directory=0;
EntryContent.Hidden=0;
EntryContent.ReadOnly=0;
EntryContent.System=0;
if(!SetEntryContent(pPath,EntryContent))
{
return FALSE;
}
return TRUE;
}
BOOL Hide_FAT32::Show()
{
if(!Hide(0))
{
return FALSE;
}
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -