M
[email protected]
Guest
Folks,
This is quite a bit out of the range of "normal" questions on this forum, but I don't know where else to find the answer(s). I have a program that used "NtOpenSymbolicLinkObject" and "NtQuerySymbolicLinkObject" to determine if two given directories were really the same directory because it is very important that the program knows this (the program is a cleanup utility that deletes files in one directory tree that are in another directory tree - and if two directories in the the two directory trees are really the same directory, the results could be disasterous. (I use symbolic links a lot.)) I am reasonably sure (but not totally so) that these functions worked for me in the past, but they are definitely not working now and the (limited!) documentation I can find on the internet says they may stop working at any time because Microsoft is dropping support for them. (I was using Vista when I added this functionality to the program and am using Windows 7 now.) (I know how to resolve junctions.) In particular, Rex, I seem to recall that you made a reference at some time in the not-too-distant past about finding another way to get this functionality (I don't remember the context), and you clearly know how to do this because the "dir" command displays where symbolic links "point" to. If I am right about this could you (or somebody) please tell me how to do it? I consider this not working to be a major flaw in the program as it now stands, (If it makes any difference, it is a C++ program.) And, on a related but far less critical task, do you know any way to get the disk address of a file? If two files on the same logical drive have the same disk address, it would mean that either some parent directories in each file's directory tree are really the same directory (junctioned or symbolically linked), or (more important for my purposes) that the there is a hardlink linking the two files together. Any insight I could get into these matters would be greatly appreciated!!!
Thanking you in advance,
- Dan Mathew
[email protected]
This is quite a bit out of the range of "normal" questions on this forum, but I don't know where else to find the answer(s). I have a program that used "NtOpenSymbolicLinkObject" and "NtQuerySymbolicLinkObject" to determine if two given directories were really the same directory because it is very important that the program knows this (the program is a cleanup utility that deletes files in one directory tree that are in another directory tree - and if two directories in the the two directory trees are really the same directory, the results could be disasterous. (I use symbolic links a lot.)) I am reasonably sure (but not totally so) that these functions worked for me in the past, but they are definitely not working now and the (limited!) documentation I can find on the internet says they may stop working at any time because Microsoft is dropping support for them. (I was using Vista when I added this functionality to the program and am using Windows 7 now.) (I know how to resolve junctions.) In particular, Rex, I seem to recall that you made a reference at some time in the not-too-distant past about finding another way to get this functionality (I don't remember the context), and you clearly know how to do this because the "dir" command displays where symbolic links "point" to. If I am right about this could you (or somebody) please tell me how to do it? I consider this not working to be a major flaw in the program as it now stands, (If it makes any difference, it is a C++ program.) And, on a related but far less critical task, do you know any way to get the disk address of a file? If two files on the same logical drive have the same disk address, it would mean that either some parent directories in each file's directory tree are really the same directory (junctioned or symbolically linked), or (more important for my purposes) that the there is a hardlink linking the two files together. Any insight I could get into these matters would be greatly appreciated!!!
Thanking you in advance,
- Dan Mathew
[email protected]