This is a bit off topic, but when I received this question I realized that we don't have the answer available anywhere so I wanted to post it just in case other folks were interested. Here is the question:
Please forgive this random email, but I'm desperately trying to find out how Office knows when it has opened a UNC path which is really a WebDAV URL exposed by the XP mini-redirector, as described by the KB excerpt below. If you have any information about this or can point me to someone who does, I would be very grateful!
"Understanding HTTP conversion for UNC redirector files --
Clients that are running Windows XP Professional can create Network
Places to DAV Web folders by using the Web Client service. The Web
Client service is also known as the WebDAV mini-redirector. This Web
Client service lets DAV-enabled folders appear as UNC shares.
An application can open the file, edit the file, and save to the file
because the application typically saves to a UNC path. However, document
collaboration requires more functions than are provided by the Web
Client service. Therefore, Office 2003 has added code to determine if a
file is opened by the Web Client service. If a file is opened by the Web
Client service, Office 2003 re-maps the path back to a full URL and then
opens the file separately by using the protocol that is appropriate for
the server type. This lets an Office 2003 application perform
full-document collaboration features, as if the file is opened directly
from the URL in Office. The information that is provided previously,
including Office Protocol Discovery, applies to documents that are
opened from a Web Client-enabled UNC share."
In Office, we call WNetGetResourceInformationW on the UNC path to get the UNC Provider name for which network provider owns the file (returned in the lpProvider name string). We then compare that to the name of the Web Client MiniRedir service (retrieved via the WNetGetProviderNameW API for WNNC_DAV). If the providers match, we know we are activated on a UNC path owned by the Web Client DAV provider and can then opt-out appropriately (back to the core Office HTTP stacks).