If the method succeeds, the return value is non-zero and lpdwZoneId
will be updated with the default zone identifier. If no default zone
has been explicitly set, the function will still return success and
lpdwZoneId will be set to SECURITY_ZONE_NONE.
If the method fails, it returns zero. To get extended error information,
call the GetLastError method.
The GetDefaultZoneId method returns the zone identifier
which was previously set using the SetDefaultZoneId method.
If no default zone has been specified for the client session, the
default behavior is to not set a security zone for the file. This
maintains backwards compatibility with previous versions of the
library which would not create the security zone metadata for
local files.
This method is typically used to confirm the currently configured
zone before downloading a file, or to verify whether the default behavior
has been overridden. The default zone ID is specific to the client session
and does not affect other sessions or system-wide settings.
To get the security zone identifier for a local file, use the
GetFileZoneInfo method. To change or remove the
security zone information for a file, use the SetFileZoneInfo
method.
For more detailed information about the zone identifiers, refer to
the SetDefaultZoneId method.