NTFS下的文件粉碎机Word文档下载推荐.docx
- 文档编号:15392154
- 上传时间:2022-10-29
- 格式:DOCX
- 页数:16
- 大小:19.40KB
NTFS下的文件粉碎机Word文档下载推荐.docx
《NTFS下的文件粉碎机Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《NTFS下的文件粉碎机Word文档下载推荐.docx(16页珍藏版)》请在冰豆网上搜索。
HANDLE
hVolume;
FILE
*pFLog;
#defineFIXOFFSET(x,y)((CHAR*)(x)+(y))
BOOLBitSet(PUCHARBitmap,ULONGIdx)
{
return(Bitmap[Idx>
>
3]&
(1<
<
(Idx&
7)))!
=0;
}
VOIDFixupUpdateSequenceArray(PFILE_RECORD_HEADERFileRecord)
PUSHORTUsAry=PUSHORT(FIXOFFSET(FileRecord,FileRecord->
Ntfs.UsaOffset));
PUSHORTSector=PUSHORT(FileRecord);
for(ULONGIdx=1;
Idx<
FileRecord->
Ntfs.UsaCount;
Idx++){
//Note:
if(UsAry[0]!
=Sector[255])thenthissectoriscorruptorbroken
Sector[255]=UsAry[Idx];
Sector+=256;
}
VOIDZeroSequenceArray(PFILE_RECORD_HEADERFileRecord)
UsAry[Idx]=0x3030;
VOIDReadSector(ULONGLONGSector,ULONGCnt,PVOIDBuffer)
ULARGE_INTEGEROffset;
OVERLAPPEDOverlap={0};
ULONGReadBytes,CntIdx=0,NeedReadByte=Cnt*BootBlk.BytesPerSector;
Offset.QuadPart
=Sector*BootBlk.BytesPerSector;
//Assignthephysicalposition.
Overlap.Offset
=Offset.LowPart;
//SetpositiontoOverlap.
Overlap.OffsetHigh=Offset.HighPart;
ReadFile(hVolume,Buffer,NeedReadByte,&
ReadBytes,&
Overlap);
if(ReadBytes!
=NeedReadByte){
//if(GetLastError()==ERROR_WORKING_SET_QUOTA||
//
GetLastError()==ERROR_NO_SYSTEM_RESOURCES){
while(CntIdx<
Cnt){
Overlap.OffsetHigh=Offset.HighPart;
ReadFile(hVolume,Buffer,BootBlk.BytesPerSector,&
if(ReadBytes!
=BootBlk.BytesPerSector){
printf("
ReadSectorfailed:
%d:
%d:
%d\n"
Offset.LowPart,Cnt*BootBlk.BytesPerSector,ReadBytes);
return;
Buffer=(UCHAR*)Buffer+BootBlk.BytesPerSector;
Offset.QuadPart+=BootBlk.BytesPerSector;
//Updatethephysicalposition.
++CntIdx;
//}else{
//printf("
Error%d...\n"
GetLastError());
//}
return;
VOIDReadLCN(ULONGLONGLCN,ULONGCnt,PVOIDBuffer)
ReadSector(LCN*BootBlk.SectorsPerCluster,Cnt*BootBlk.SectorsPerCluster,Buffer);
VOIDWriteSector(ULONGLONGSector,ULONGCnt,PVOIDBuffer)
ULONGWritten;
WriteFile(hVolume,Buffer,Cnt*BootBlk.BytesPerSector,&
Written,&
if(Written!
=Cnt*BootBlk.BytesPerSector)printf("
Wrotefailed:
Overlap.Offset,Cnt*BootBlk.BytesPerSector,Written);
VOIDWriteLCN(ULONGLONGLCN,ULONGCnt,PVOIDBuffer)
WriteSector(LCN*BootBlk.SectorsPerCluster,Cnt*BootBlk.SectorsPerCluster,Buffer);
VOIDZeroLCN(ULONGLONGLCN,ULONGCnt)
ULONGLONGZeroSectorNum=512;
BYTE*p512Sector=newBYTE[(UINT)BootBlk.BytesPerSector*(UINT)ZeroSectorNum];
ULONGLONGSectorNum=Cnt*(UINT)BootBlk.SectorsPerCluster;
ULONGLONGSectorSrtIdx=LCN*BootBlk.SectorsPerCluster,Idx;
ULONGLONGSectorEndIdx=SectorSrtIdx+SectorNum;
printf("
->
SectorStartIndex:
%d,ZeroSectornumberis%d\n"
(UINT)SectorSrtIdx,(UINT)SectorNum);
memset(p512Sector,'
0'
(UINT)BootBlk.BytesPerSector*(UINT)ZeroSectorNum);
if(p512Sector){
Idx=SectorSrtIdx;
while((SectorNum>
0)&
&
(ZeroSectorNum>
0)){
\n%3d--->
"
ZeroSectorNum);
for(;
(Idx<
SectorEndIdx)&
(SectorNum>
=ZeroSectorNum);
Idx+=ZeroSectorNum){
WriteSector(Idx,(UINT)ZeroSectorNum,p512Sector);
SectorNum-=ZeroSectorNum;
."
);
ZeroSectorNum>
=1;
if(SectorNum){
assert(SectorNum==1);
WriteSector(Idx,1,p512Sector);
1);
\n"
delete[]p512Sector;
ULONGAttributeLength(PATTRIBUTEAttr)
returnAttr->
Nonresident==FALSE
?
PRESIDENT_ATTRIBUTE(Attr)->
ValueLength
:
ULONG(PNONRESIDENT_ATTRIBUTE(Attr)->
DataSize);
ULONGAttributeLengthAllocated(PATTRIBUTEAttr)
AllocatedSize);
ULONGRunLength(PUCHARRun)
return(*Run&
0xf)+((*Run>
4)&
0xf)+1;
ULONGLONGRunCount(PUCHARRun)
UCHARIdx=*Run&
0xF;
//GetEndIndex.
ULONGLONGCnt=0;
for(;
Idx>
0;
Idx--)
Cnt=(Cnt<
8)+Run[Idx];
returnCnt;
LONGLONGRunLCN(PUCHARRun)
UCHARVCNNumEndIdx=*Run&
0xf;
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- NTFS 文件 粉碎机
![提示](https://static.bdocx.com/images/bang_tan.gif)