If the method succeeds, the return value is the length of the
local file name, not including the terminating null character. If
the method fails, the return value is zero. To get extended error
information, call GetLastError.
This method returns the complete path to the file that will be
created or overwritten during the download. The file path returned by
this method is always an absolute path which ensures that the
application does not need to resolve relative paths or expand
environment variables. The path returned may refer to a file that has
not yet been created or fully written if the download is still in
progress. Applications should check the download status with
GetDownloadInfo before assuming the file is complete and
ready to use.
The dwFileId parameter uniquely identifies the download
within the current client session. This identifier can be obtained
from download-related event notifications or by calling
WebViewEnumDownloads. As with other functions that use file
identifiers, applications should treat this value as opaque and only
valid for the lifetime of the session.
If the provided string buffer is too small, the method will return the
required length of the file path, not including the terminating null
character. The caller can use this information to allocate a
sufficiently large buffer and call the method again. There are both
ANSI and Unicode versions of this method and the correct version is
called based on how the project is configured. If the
GetDownloadPathA method is called, the file path will
always be returned as a UTF-8 encoded string regardless of the
current locale.