If the function 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
the variable
lpdwZoneId points to will be set to SECURITY_ZONE_NONE.
If the function fails, it returns zero. To get extended error information,
call FtpGetLastError.
The FtpGetDefaultZoneId function returns the zone identifier
which was previously set using the FtpSetDefaultZoneId
function. 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 function 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
FtpGetFileZoneInfo function. To change or remove the
security zone information for a file, use the FtpSetFileZoneInfo
function.
For more detailed information about the zone identifiers, refer to
the FtpSetDefaultZoneId function.