Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Calling DLL function that is not imported(MFC and WinMain) Pin
sgenie6813-Jun-09 22:22
sgenie6813-Jun-09 22:22 
QuestionHow to open a logical partition and read all of its file using windows function ReadFile() ? Pin
krish_kumar12-Jun-09 22:53
krish_kumar12-Jun-09 22:53 
QuestionRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
Randor 13-Jun-09 5:38
professional Randor 13-Jun-09 5:38 
AnswerRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
krish_kumar13-Jun-09 6:27
krish_kumar13-Jun-09 6:27 
GeneralRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
Stuart Dootson13-Jun-09 12:59
professionalStuart Dootson13-Jun-09 12:59 
GeneralRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
Randor 14-Jun-09 6:14
professional Randor 14-Jun-09 6:14 
GeneralRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
krish_kumar14-Jun-09 18:32
krish_kumar14-Jun-09 18:32 
GeneralRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
Randor 15-Jun-09 7:37
professional Randor 15-Jun-09 7:37 
krish_kumar wrote:
I took a sample file and get it's corrresponding cluster
details using "FSCTL_GET_RETRIEVAL_POINTERS" along with DeviceIoControl and copied it into another partition.
And this successfully copied the source file .
Like this I wanna get all files.So it may take much more time..?


Yes. Of course it will take more time if you are enumerating all files/directories and copy them individually via FSCTL_GET_RETRIEVAL_POINTERS ReadFile/WriteFile. Your wasting your time here. Your other method which read the partition in 50MB increments will probably be faster.

krish_kumar wrote:
How to get all file one by one.?


What is preventing you from enumerating all files? If you can copy 1 file... why not 2? If you can copy 2 files... why not 20,000? Are you having trouble enumerating files?

krish_kumar wrote:
And I tried one more way using "FSCTL_GET_VOLUME_BITMAP"along with DeviceIoControl.In this case I take the
whole volume as handle to createfile() and find out the used cluster only;and simply copied them to another partition.


Without seeing your code I cannot possibly know what you did wrong. However as others have stated... there is alot of complexity involved. The NTFS $MFT contains logical offsets which map to physical locations. In addition.. you are dealing with logical and physical offsets[^] when dealing with the $Bitmap.

I dont want to discourage you. I am sure you have a valid reason why you want to copy a 2GB partition in 5 seconds rather than 10 seconds. I believe that using FSCTL_GET_VOLUME_BITMAP to get a list of all used clusters and copy only the used clusters may work. However you need to put the clusters back into the same offsets on the new partition.

What does your FSCTL_GET_VOLUME_BITMAP code look like? Are you trying to copy all of the used clusters onto the new partition in a contiguous stream? Keep in mind that you need to preserve the offsets. Can you show some code?

Good Luck,
-David Delaune
GeneralRe: How to open a logical partition and read all of its file using windows function ReadFile() ? [modified] Pin
krish_kumar15-Jun-09 15:19
krish_kumar15-Jun-09 15:19 
GeneralRe: How to open a logical partition and read all of its file using windows function ReadFile() ? Pin
krish_kumar19-Jun-09 20:01
krish_kumar19-Jun-09 20:01 
Questionvirtual constructor Pin
siva45512-Jun-09 22:11
siva45512-Jun-09 22:11 
AnswerRe: virtual constructor Pin
Rajesh R Subramanian12-Jun-09 22:16
professionalRajesh R Subramanian12-Jun-09 22:16 
AnswerRe: virtual constructor Pin
Cedric Moonen12-Jun-09 23:09
Cedric Moonen12-Jun-09 23:09 
GeneralRe: virtual constructor Pin
Arun Singh K13-Jun-09 0:57
Arun Singh K13-Jun-09 0:57 
QuestionC++ dll for Excel -> Is it possible to return strings with > 255 characters in Excel? [modified] Pin
T210212-Jun-09 22:00
T210212-Jun-09 22:00 
AnswerRe: Possible to return strings with >255 characters in Excel? Pin
Rajesh R Subramanian12-Jun-09 22:10
professionalRajesh R Subramanian12-Jun-09 22:10 
GeneralRe: Possible to return strings with >255 characters in Excel? Pin
T210212-Jun-09 23:13
T210212-Jun-09 23:13 
GeneralRe: Possible to return strings with >255 characters in Excel? Pin
Rajesh R Subramanian12-Jun-09 23:26
professionalRajesh R Subramanian12-Jun-09 23:26 
GeneralRe: Possible to return strings with >255 characters in Excel? Pin
T210212-Jun-09 23:47
T210212-Jun-09 23:47 
GeneralRe: Possible to return strings with >255 characters in Excel? Pin
Rajesh R Subramanian12-Jun-09 23:49
professionalRajesh R Subramanian12-Jun-09 23:49 
GeneralRe: Possible to return strings with >255 characters in Excel? Pin
AlexesDad30-Jun-09 11:40
AlexesDad30-Jun-09 11:40 
QuestionErrors occurs while compiling Smart device MFC application using VS2005 Pin
saksp12-Jun-09 20:42
saksp12-Jun-09 20:42 
GeneralRe: Errors occurs while compiling Smart device MFC application using VS2005 Pin
Arun Singh K13-Jun-09 1:00
Arun Singh K13-Jun-09 1:00 
Questionweight and bias chage problem in neural network AND gate Pin
salahuddincse12-Jun-09 17:04
salahuddincse12-Jun-09 17:04 
QuestionI'm hoping some C# Guru out there can help me... (IndexOf and Multidimension Arrays) Pin
Paul Calabro12-Jun-09 14:48
Paul Calabro12-Jun-09 14:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.