资源简介
ntfs的可编译的代码。我基于nt4改造的。相信搞文件系统的会相当有用吧?

代码片段和文件信息
/*++
Copyright (c) 1991 Microsoft Corporation
Module Name:
AllocSup.c
Abstract:
This module implements the general file stream allocation & truncation
routines for Ntfs
Author:
Tom Miller [TomM] 15-Jul-1991
Revision History:
--*/
#include “NtfsProc.h“
//
// Local debug trace level
//
#ifndef Dbg
#define Dbg (DEBUG_TRACE_LOGSUP)
#endif
//
// Internal support routines
//
VOID
NtfsDeleteAllocationInternal (
IN PIRP_CONTEXT IrpContext
IN PFILE_object Fileobject OPTIONAL
IN OUT PSCB Scb
IN VCN StartingVcn
IN VCN EndingVcn
IN BOOLEAN LogIt
);
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE NtfsPreloadAllocation)
#pragma alloc_text(PAGE NtfsAddAllocation)
#pragma alloc_text(PAGE NtfsAllocateAttribute)
#pragma alloc_text(PAGE NtfsBuildMappingPairs)
#pragma alloc_text(PAGE NtfsDeleteAllocation)
#pragma alloc_text(PAGE NtfsDeleteAllocationInternal)
#pragma alloc_text(PAGE NtfsGetHighestVcn)
#pragma alloc_text(PAGE NtfsGetSizeForMappingPairs)
#endif
ULONG
NtfsPreloadAllocation (
IN PIRP_CONTEXT IrpContext
IN OUT PSCB Scb
IN VCN StartingVcn
IN VCN EndingVcn
)
/*++
Routine Description:
This routine assures that all ranges of the Mcb are loaded in the specified
Vcn range
Arguments:
Scb - Specifies which Scb is to be preloaded
StartingVcn - Specifies the first Vcn to be loaded
EndingVcn - Specifies the last Vcn to be loaded
Return Value:
Number of ranges spanned by the load request.
--*/
{
VCN CurrentVcn LastCurrentVcn;
LCN Lcn;
LONGLONG Count;
PVOID RangePtr;
ULONG RunIndex;
ULONG RangesLoaded = 0;
PAGED_CODE();
//
// Start with starting Vcn
//
CurrentVcn = StartingVcn;
//
// Always load the nonpaged guys from the front so we don‘t
// produce an Mcb with a “known hole“.
//
if (FlagOn(Scb->Fcb->FcbState FCB_STATE_NONPAGED)) {
CurrentVcn = 0;
}
//
// Loop until it‘s all loaded.
//
while (CurrentVcn <= EndingVcn) {
//
// Remember this CurrentVcn as a way to know when we have hit the end
// (stopped making progress).
//
LastCurrentVcn = CurrentVcn;
//
// Load range with CurrentVcn and if it is not there get out.
//
(VOID)NtfsLookupAllocation(IrpContext Scb CurrentVcn &Lcn &Count &RangePtr &RunIndex);
//
// Find out how many runs there are in this range
//
if (!NtfsNumberOfRunsInRange(&Scb->Mcb RangePtr &RunIndex) || (RunIndex == 0)) {
break;
}
//
// Get the highest run in this range and calculate the next Vcn beyond this range.
//
NtfsGetNextNtfsMcbEntry(&Scb->Mcb &RangePtr RunIndex - 1 &CurrentVcn &Lcn &Count);
CurrentVcn += Count;
//
// If we are making no progress we must have
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 100498 2009-05-20 10:07 ntfs\allocsup.c
文件 8619 1997-08-27 11:41 ntfs\attrdata.c
文件 427873 2009-05-20 13:01 ntfs\attrsup.c
文件 242008 2009-06-01 09:14 ntfs\bitmpsup.c
文件 41437 2009-05-20 09:52 ntfs\cachesup.c
文件 23352 1997-08-27 11:41 ntfs\checksup.c
文件 76337 2009-05-20 13:18 ntfs\cleanup.c
文件 29683 2009-05-20 09:56 ntfs\close.c
文件 15536 2009-05-20 10:14 ntfs\colatsup.c
文件 352499 2009-05-29 11:31 ntfs\create.c
文件 20163 2009-05-20 09:19 ntfs\ddkbuild.bat
文件 5275 2009-05-20 13:14 ntfs\devctrl.c
文件 251718 2009-05-20 10:06 ntfs\deviosup.c
文件 45901 2009-05-20 13:17 ntfs\dirctrl.c
文件 68151 2009-05-20 13:17 ntfs\ea.c
文件 20943 1997-08-27 11:41 ntfs\fieldoff.c
文件 243602 2009-05-20 13:16 ntfs\fileinfo.c
文件 8175 2009-05-20 13:02 ntfs\filobsup.c
文件 54989 2009-05-20 13:12 ntfs\flush.c
文件 238765 2009-05-31 22:11 ntfs\fsctrl.c
文件 22349 2009-05-20 13:16 ntfs\fspdisp.c
文件 50330 2009-05-20 00:14 ntfs\fstiosup.c
文件 3017 1997-08-27 11:41 ntfs\index.h
文件 207857 2009-05-20 10:14 ntfs\indexsup.c
文件 58978 2009-05-20 12:41 ntfs\lfs\cachesup.c
文件 291 1997-08-27 11:49 ntfs\lfs\dirs
文件 11224 2009-05-20 11:04 ntfs\lfs\lbcbsup.c
文件 1882 2009-05-20 11:04 ntfs\lfs\lfsdata.c
文件 6859 2009-05-20 11:00 ntfs\lfs\lfsdata.h
文件 12042 2009-05-20 10:36 ntfs\lfs\lfsdisk.h
............此处省略82个文件信息
- 上一篇:IE恶搞英语新理念大厅
- 下一篇:文件MD5效验工具
相关资源
- E4A无障碍跨程序操作类库(带源码、
- 设备管理系统源码
- 安卓wifi直连app源码
- 我的世界源码(易语言版)
- labview编程软件滤波器以及编写程序设
- 我的界面(visual foxpro)源码
- 易语言:一键cf基址源码
- The Secret Path 3D 3D魔方迷宫[源码][scra
- scratch垃圾分类源码(最终版本).sb
- 安卓QQ6.71协议源码易语言,qq协议源码
- 编译原理实验工具及参考源码(lex&
- E盾偷后台工具源码
- UNIX/LINUX编程实践教程的源码
- 十以内加减法练习 powerbuilder源码
- 农场开发项目
- OCR源码
- PLC上位机编程软件
- 用foobar2000听google音乐[更新一下]
- 学生信息管理系统源码
- 用VC 编写的仿QQ聊天室程序源代码
- 毕业论文之温度传感器DS18B20(源码
- 可自定义导航网站源码
- 栅栏填充算法源码(VC)
- msp430F149操作红外接收模块源码
- [免费]图像识别c 源码
- 周易排盘源码
- RSA算法源码
- 一个人脸识别程序源码
- 编译原理课程设计:词法语法编译器
- 透明加密源码及说明
评论
共有 条评论