Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Hey! why do u call DeleteFile???
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

guest1234
New Member

5 Posts

Posted - Oct 21 2004 :  09:05:11 AM  Show Profile
I want to work with Hard Links.the windows's NTFS filesystem support hard file links. but i found the hard link no longer valid after a few modification and saving. This must be that some one called DeleteFile to delete the hardlink,and recreate it by createfile.
I thought it it vc that do this,but i'm wrong. when I use a debugger to break at DeleteFile,I found that it is visual assist who do this silly work.
why do u do THIS????
0012F5EC 1ED0EFFC /CALL to DeleteFileA from va_x.1ED0EFF6
0012F5F0 02959440 \\FileName = "D:\\cpp\\dll\\dll.cpp"
0012F5F4 02959440 ASCII "D:\\cpp\\dll\\dll.cpp"
0012F5F8 5084482D RETURN to devedit.5084482D from va_x.1ED0EFF0
0012F5FC 02959440 ASCII "D:\\cpp\\dll\\dll.cpp"
0012F600 00E86380

support
Whole Tomato Software

5566 Posts

Posted - Oct 21 2004 :  12:25:27 PM  Show Profile
While not acknowleding the specifics of your example, we will say VA X deletes and creates many files during its execution. We cache files, maintain working copies that we load/unload from the editor window, etc.
Go to Top of Page

ivan
Ketchup Master

Russia
75 Posts

Posted - Oct 21 2004 :  4:33:45 PM  Show Profile
Hmm, using DeleteFile indeed looks wrong. Since I don't see any of my source files missing because of VAX ;) I assume that when you delete a file you immediately move/copy a new one to its place. In this case fixing the hard links issue is easy: just overwrite the file programmatically instead of using things like DeleteFile/CopyFile (or whatever you use).

DeleteFile/CopyFile deletes the hard link and creates a new file (if called on a file that has hard links, that is). Using stuff like CreateFile/ReadFile/WriteFile you would preserve the hard link and change the original file instead of creating a new one.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000