none
How to detect if file is on DFS and convert to SMB path RRS feed

  • Question

  • Hi All

    I'm trying to debug a legacy app (which I didn't write) which is used on XP for mounting VHD files for an internal app.  The app works fine unless the VHD is stored on a DFS share.  What I'm wondering is:

    1.  Is there an API (eg in Netapi32.dll) which one can call from C++ to determine if the path is a DFS path of just a "regular" SMB path ?

    2.  How should an app. handle a file which is stored on DFS share - ie, when the root DFS server sends back a reply  (eg STATUS_PATH_NOT_COVERED) what can the app call to "convert" the path from DFS to an SMB path ?

    I've tried doing some searching, but all I can find on MSDN related to DFS are the list on this page:

    http://msdn.microsoft.com/en-us/library/windows/desktop/bb524821(v=vs.85).aspx

    Thanks in advance

    Monday, February 20, 2012 9:28 PM

Answers