You are here: COM Interface > Interfaces > IServer Interface > IServer::ConvertPath Method
Close
dtSearch Text Retrieval Engine Programmer's Reference
IServer::ConvertPath Method
Syntax
IDL
HRESULT ConvertPath(BSTR path, long siteId, long flags, BSTR tableLocation, [out, retval] BSTR * pVal);
Parameters
Description
BSTR path
Path to convert
long siteId
ID of the web site on a web server. If there is only one web site on the server, use 1. The ASP value Request.ServerVariables("INSTANCE_ID") can be used if the web server has more than one web site. (The web site id is needed because each site has its own mapping between virtual and local paths.)
long flags
ConvertPathFlags specifying the type of conversion
reserved
Not used

The result of the conversion

Use ConvertPath to convert between virtual and local paths.

Internet Information Server stores its mapping between virtual and local paths in the Metabase. Reading this information from the Metabase is time-consuming and requires access rights that may not be available to a process running in the web server context. Therefore, the dtSearch Engine caches this information in the registry, under the key HKEY_LOCAL_MACHINE\Software\dtSearch Corp.\dtSearch\Virtual Roots. By default, ConvertPath will use the cached table values. Call ConvertPath with the dtsCpRefreshMappings + dtsCpStoreInRegistry flags to update the cached information. (Running dtWebSetup.exe, the dtSearch Web Setup program, will also update this information.) 

If ConvertPath returns a blank string, it means that either (1) the folder passed in does not have a virtual directory associated with it, or (2) the registry tables have not been refreshed since the virtual directory was created.

Copyright (c) 1995-2021 dtSearch Corp. All rights reserved.