共用方式為


3.1.4.17 R_DnssrvQuery4 (Opnum 16)

The R_DnssrvQuery4 method queries the DNS server for information. The type of information queried for is specified by the client using the pwszVirtualizationInstanceID, and pszOperation parameters. The DNS server SHOULD<292> implement R_DnssrvQuery4.

All the parameters are as specified by the R_DnssrvQuery2 method (section 3.1.4.7) method with the following exceptions:

    LONG R_DnssrvQuery4(
      [in]                            DWORD                  dwClientVersion,
      [in]                            DWORD                  dwSettingFlags,
      [in, unique, string]            LPCWSTR                pwszServerName,
      [in, unique, string]            LPCWSTR                pwszVirtualizationInstanceID,
      [in, unique, string]            LPCSTR                 pszZone,
      [in, unique, string]            LPCWSTR                pwszZoneScopeName,
      [in, unique, string]            LPCSTR                 pszOperation,
      [out]                           PDWORD                 pdwTypeId,
      [out, switch_is(*pdwTypeId)]    DNSSRV_RPC_UNION*      ppData
    );

pwszVirtualizationInstanceID: A pointer to a null-terminated Unicode string that contains the name of the virtualization instance configured on the DNS server. For operations specific to a particular virtualization instance, this field MUST contain the name of the virtualization instance. If the value is NULL, then the API is as specified in R_DnssrvQuery3 (section 3.1.4.14). Apart from the VirtualizationInstances operation (section 3.1.4.2), R_DnssrvQuery3 (section 3.1.4.14) changes the behavior of the following operations: Zone, ZoneInfo (section 3.1.4.2) and ScopeInfo (section 3.1.4.14) operations. If these operations are called with R_DnssrvQuery4 and a non-NULL pwszVirtualizationInstanceID parameter, they are performed under the given virtualization instance. The ScopeInfo operation is defined for R_DnssrvQuery4 with a non-NULL virtualization instance only if pszZone is not NULL.

Return Values: The method MUST return ERROR_SUCCESS (0x00000000) on success or a nonzero Win32 error code value if an error occurred. If unable to perform the operation, returns error EPT_S_CANT_PERFORM_OP (0x000006D8). See [MS-ERREF] section 2.2 or section 2.2.1.1.5. All error values MUST be treated the same.

When processing this call, the server MUST perform the same actions as for the R_DnssrvQuery3 method (section 3.1.4.14) except in the event the dwClientVersion is greater than the server version, in which case the server MUST return the highest version number.