Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Translate Logical Drive to Physical Drive [modified] Pin
Bram van Kampen11-Aug-09 11:09
Bram van Kampen11-Aug-09 11:09 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 11-Aug-09 13:06
professional Randor 11-Aug-09 13:06 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Bram van Kampen12-Aug-09 8:31
Bram van Kampen12-Aug-09 8:31 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton24-Dec-11 21:37
Andy Belton24-Dec-11 21:37 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 26-Dec-11 11:13
professional Randor 26-Dec-11 11:13 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton1-Jan-12 1:40
Andy Belton1-Jan-12 1:40 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 1-Jan-12 2:54
professional Randor 1-Jan-12 2:54 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton4-Jun-12 4:34
Andy Belton4-Jun-12 4:34 
Hi David

Sorry to bug you again.

My application was finished and put out for field trials. Yup - it hit a couple of problems (well quite a few actually). Most were trivial to solve. However, I am stuck with two, both related (one directly the other indirectly) to my original question.

To help understand the setup, the application is XP platorm based and used primarily at the client office. Howeverm the application also needs to be used in the field (litteraly). So the client wanted the facility to copy work data files on to a second drive that could then be sent out to 'engineers' working in the field who could then interogate them on whatever they have there.

The reason for getting the Physocal drive info wsa to ensure that the files were not written to the same physical drive. After writing, the target drive is removed and sent out. (The drive can be internal or external). (That is about the limit as to what I can disclose for security reasons).

In my code, I used your solution to obtain the physical drive information. I compare the DriveNumber and PartionNumber numbers to enure they are different drives. This is fine. But I think that I should also be check which controller is being used as I could be blocking a drive that is actually on a different controller.

So, Question 1 - How do I determine the drive controller? I have spent some time searching both MSDN and CodeProject and have not found an obvious answer. I think what I need to find are the four parameters as used in boot.ini to select the boot operating system.

Now for the indirectly related problem. In practice, the client is using whatever hard drive comes to them from another source. Normally this drive is NTFS formated but some times it is FAT formated. I have no control over this and neither does the client. Out in the field I am using the file modified date from GetFileInformationEx(). This is because all files are loaded to be shipped out but, only those that have a later date to those exisiting in the field are used. However, we are getting problems with file dates.

It appears that if you copy a file from NTFS to a FAT file system the date can change. The FAT system does not store the milliseconds, instead the time is rounded up. I could deal with this if it were consistant but, I have seen a direct file copy between two drives and the times have been different by as much as five minutes! In one instance, I actually witnessed the file date being two minutes ahead of the current time! Any thoughts on this one? Please?

So, Question 2 - how can I ensure a consistant date record on a FAT drive? I do detect the drive file system and display this to the user.

Best regards
Andy Belton
QuestionIostream processing\flags question Pin
GuimaSun10-Aug-09 12:23
GuimaSun10-Aug-09 12:23 
AnswerRe: Iostream processing\flags question Pin
Stuart Dootson10-Aug-09 21:10
professionalStuart Dootson10-Aug-09 21:10 
GeneralRe: Iostream processing\flags question Pin
GuimaSun11-Aug-09 2:55
GuimaSun11-Aug-09 2:55 
QuestionWait Until Event Occurs Pin
staticv10-Aug-09 4:50
staticv10-Aug-09 4:50 
AnswerRe: Wait Until Event Occurs Pin
Stuart Dootson10-Aug-09 8:32
professionalStuart Dootson10-Aug-09 8:32 
GeneralRe: Wait Until Event Occurs Pin
staticv10-Aug-09 20:30
staticv10-Aug-09 20:30 
GeneralRe: Wait Until Event Occurs Pin
Stuart Dootson10-Aug-09 21:01
professionalStuart Dootson10-Aug-09 21:01 
GeneralRe: Wait Until Event Occurs Pin
staticv10-Aug-09 21:25
staticv10-Aug-09 21:25 
QuestionSHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Nitheesh George10-Aug-09 4:43
Nitheesh George10-Aug-09 4:43 
AnswerRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 8:27
professionalStuart Dootson10-Aug-09 8:27 
AnswerRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 9:44
professional Randor 10-Aug-09 9:44 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 10:29
professionalStuart Dootson10-Aug-09 10:29 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 11:15
professional Randor 10-Aug-09 11:15 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 11:23
professionalStuart Dootson10-Aug-09 11:23 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Nitheesh George10-Aug-09 21:38
Nitheesh George10-Aug-09 21:38 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 22:55
professional Randor 10-Aug-09 22:55 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
kilt11-Aug-09 6:09
kilt11-Aug-09 6:09 

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.