If the method succeeds, the return value is the number of
characters in the home URL, not including the terminating null
character. If a home URL has not been specified, or the method
fails, the return value is zero. To get extended error information,
call the GetLastError method.
The GetHomeUrl method retrieves the home URL associated
with the specified WebView control. If no home URL has been defined,
the method returns zero and the output buffer is empty.
When an instance of the browser is first created, no default home
URL is assigned. In particular, the home URL is not automatically
initialized to about:blank or to the address of the first
document loaded. The application must explicitly assign a home URL
using SetHomeUrl. Until a home URL has been assigned,
this method returns zero.
The length returned by this method does not include the
terminating null character. If the output buffer is NULL or the
maximum buffer length is zero, the method returns the number of
characters required to store the URL, excluding the terminating null
character. This allows an application to determine the required buffer
size before retrieving the URL.
If the supplied buffer is too small to contain the complete URL and
its terminating null character, the method fails and sets the last
error to ST_ERROR_BUFFER_TOO_SMALL. The URL is never
truncated. The maximum buffer length is specified in characters for
Unicode applications and bytes for applications using UTF-8 encoding.
Retrieving the home URL does not change the current document or
navigation state of the browser.