The ResolvePath method is used to resolve a local file name
or directory to obtain its virtual path name, or obtain the full path
name of a file or directory that is mapped to a virtual path. If
the IsVirtual parameter is omitted or is False, the
SourcePath parameter is considered to be a path to a local
file or directory and the ResolvedPath parameter will contain
the virtual path. If the IsVirtual parameter is True, then the
SourcePath parameter is considered to be a virtual path and
the ResolvedPath parameter will contain the full path to the
local file or directory that the virtual path is mapped to
A virtual path for the client is either relative to the
server root directory, or the client home directory if the client was
authenticated as a restricted user. These virtual paths are what the
client will see as an absolute path on the server. For example, if the
server was configured to use "C:\ProgramData\MyServer" as
the root directory, and the SourcePath parameter was specified
as "C:\ProgramData\MyServer\Documents\Research", this method
would return the virtual path to that directory as
"/Documents/Research".
If the client session was authenticated as a restricted user, then
the virtual path is always relative to the client home directory
instead of the server root directory. This is because restricted users
are isolated to their own home directory and any subdirectories. For
example, if restricted user "John" has a home directory of
"C:\ProgramData\MyServer\Users\John" and the SourcePath
parameter was specified as
"C:\ProgramData\MyServer\Users\John\Accounting\Projections.pdf"
this method would return the virtual path as
"/Accounting/Projections.pdf".
If the SourcePath parameter specifies a file or directory
outside of the server root directory, this method will fail and the
last error code will be set to stErrorInvalidFileName. This method can
only be used with authenticated clients. If the ClientId
parameter specifies a client session that has not been authenticated,
this method will fail and the last error code will be
stErrorAuthenticationRequired.