?? 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 + -