4.22 Enumerating Zone Scopes in the Virtualization Instance Zone

The following example describes how to enumerate zone scopes under zone "example.com", which lies under a virtualization instance named "example_vi1" in the DNS server.

The client calls R_DnssrvComplexOperation3 (section 3.1.4.15) and provides the following parameters:

  • DNS_RPC_CURRENT_CLIENT_VER (section 2.2.1.2.1) as the client version.

  • Zero as the settings flag.

  • A Unicode string containing the FQDN of the DNS server on which the zones scopes are to be enumerated.

  • A Unicode string containing the name of the virtualization instance under which zone scopes are to be enumerated, in pwszVirtualizationInstanceID. In our example, this contains "example_vi1".

  • "example.com" as pszZone.

  • Zero as the context.

  • EnumZoneScopes as the operation.

  • DNSSRV_TYPEID_NULL as the value of dwTypeIn.

  • NULL as the value of pDataIn.

  • Address of a dword in pdwTypeOut.

  • Create a pointer to DNS_RPC_ENUM_ZONE_SCOPE_LIST (section 2.2.13.1.1) structure. Pass the address of this structure as RPC data.

The DNS server returns ERROR_SUCCESS if the operation was successful or a Windows error code if the operation fails.