Complete Compilation of nt4's NTFS source code small-scale modification project

Source: Internet
Author: User

Original: A small-scale modification project of NT4's NTFS can be compiled

For the complete attachment, seeHttp://bbs.pediy.com/showthread.php? T = 90393

·

As you know, the file system should be relatively independent in the operating system, and you only need to provide corresponding interfaces for upper-layer use.
The same is true for Windows NTFS file systems,
In actual programming, Windows provides read/write interfaces for the upper-layer Io manager and cache manager in the form of dispatch routing,
Even the page breaks of the file system itself are implemented through its own read/write routines.
Therefore, in terms of design, its relative independence provides us with a lot of convenience for its drive.
I believe you have also read the NTFS source code of NT4.
But that source code is far from the current win 5.1 (NT4 should be written in 91 years ).
However, due to the independence of the file system, I think that the change in NTFS's own structure may not impede its transplantation.
This turns out to be the same. After I deduct the NT4 code, I can run it successfully under xp with only a few modifications, this may be very convenient for the majority of operating system enthusiasts ~

I thought it would be difficult to transplant to XP,
But in the actual process, I only modified a small part.
This includes a deadlock bug in the read operation. The cause of this bug is:
If pageio is used in ntfscommonread,
In addition, it is asynchronous read. Ms forgot to put the lock into the context of the completed function. The lock is nowhere to be released.
In addition, the NT4 Code lacks the ntfsfsdpnp routine.
This routine is called in ntcreatepagingfile-pppagepathassign.
I originally wanted to refer to XP, but it seems that it was not successful, So I simply returned STATUS_SUCCESS,
It seems that there are no major problems, and you can also switch pages ~
In other aspects, what is the NTFS file structure,
You do not need to modify it. So you may despise me. After all, I have not made any major changes,
Take such a question to attract everyone. But I think it's better than yingcracker,
This doll directly changed my ksbinsword to his title.
As for how to use the NTFS that can be debugged by source code, I don't have to say much about it,
For example, if you want to study how to forcibly delete a file, debug NtfsDeleteFile.
With the code, it is much easier! The structure you want to view depends on. You can also modify the file to hide it.
Sys in the attachment cannot be run directly because the entry function has an int 3 breakpoint.
Below is:
We can see that the unique functions of NTFS such as hard links are also well supported.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.