3.2.5.6 W32TimeQueryConfiguration (Opnum 5)

The W32TimeQueryConfiguration method returns the configuration data of the time service.<47> The MIDL syntax of this method is specified as follows.

 unsigned long W32TimeQueryConfiguration(
   [in] handle_t hBinding,
   [out, ref] PW32TIME_CONFIGURATION_INFO* pConfigurationInfo
 );

hBinding: RPC primitive binding handle, as specified in [C706] part 3, sections Interface Definition Language and Stubs.

pConfigurationInfo: A pointer that receives a pointer to a W32TIME_CONFIGURATION_INFO structure containing configuration data for the time service.

Return Values: This method MUST return 0 on success; on failure, it returns a nonzero error code. The values transmitted in this field are implementation specific. All nonzero values MUST be treated as equivalent for the purposes of this protocol.<48>

When W32TimeQueryConfiguration is invoked, the server MUST return the associated time service configuration data structure, as specified in section 2.2.13, and populate it as follows:

  1. pConfigurationInfo.ulSize MUST be set with the size, in bytes, of the W32TIME_CONFIGURATION_INFO structure.

  2. pConfigurationInfo.basicConfig.ulSize MUST be set with the size, in bytes, of the W32TIME_CONFIGURATION_BASIC structure.

  3. pConfigurationInfo.basicConfig.ulEventLogFlags MUST be set to the EventLogFlags data element value (section 3.2.1.1).

  4. pConfigurationInfo.basicConfig.ulAnnounceFlags MUST be set to the AnnounceFlags abstract data model element value (see [MS-SNTP] section 3.2.1).

  5. pConfigurationInfo.basicConfig.ulTimeJumpAuditOffset MUST be set to the TimeJumpAuditOffset data element value (section 3.2.1.1).

  6. pConfigurationInfo.basicConfig.ulMinPollInterval MUST be set to Min Polling Interval (NTP.MINPOLL), as specified in [RFC1305] section 3.2.7, "Parameters".

  7. pConfigurationInfo.basicConfig.ulMaxPollInterval MUST be set to Max Polling Interval (NTP.MAXPOLL), as specified in [RFC1305] section 3.2.7, "Parameters".

  8. pConfigurationInfo.basicConfig.ulMaxNegPhaseCorrection MUST be set to the MaxNegPhaseCorrection data element value (section 3.2.1.1).

  9. pConfigurationInfo.basicConfig.ulMaxPosPhaseCorrection MUST be set to the MaxPosPhaseCorrection data element value (section 3.2.1.1).

  10. pConfigurationInfo.basicConfig.ulMaxAllowedPhaseOffset MUST be set to the MaxAllowedPhaseOffset data element value (section 3.2.1.1).

  11. pConfigurationInfo.basicConfig.ulEventLogFlagsFlag MUST be set to an integer indicating the type of the configuration setting for ulEventLogFlags, as specified in section 2.2.6.

  12. pConfigurationInfo.basicConfig.ulAnnounceFlagsFlag MUST be set to an integer indicating the type of the configuration setting for ulAnnounceFlags, as specified in section 2.2.6.

  13. pConfigurationInfo.basicConfig.ulTimeJumpAuditOffsetFlag MUST be set to an integer indicating the type of the configuration setting for ulTimeJumpAuditOffset, as specified in section 2.2.6.

  14. pConfigurationInfo.basicConfig.ulMinPollIntervalFlag MUST be set to an integer indicating the type of the configuration setting for ulMinPollInterval, as specified in section 2.2.6.

  15. pConfigurationInfo.basicConfig.ulMaxPollIntervalFlag MUST be set to an integer indicating the type of the configuration setting for ulMaxPollInterval, as specified in section 2.2.6.

  16. pConfigurationInfo.basicConfig.ulMaxNegPhaseCorrectionFlag MUST be set to an integer indicating the type of the configuration setting for ulMaxNegPhaseCorrection, as specified in section 2.2.6.

  17. pConfigurationInfo.basicConfig.ulMaxPosPhaseCorrectionFlag MUST be set to an integer indicating the type of the configuration setting for ulMaxPosPhaseCorrection, as specified in section 2.2.6.

  18. pConfigurationInfo.basicConfig.ulMaxAllowedPhaseOffsetFlag MUST be set to an integer indicating the type of the configuration setting for ulMaxAllowedPhaseOffset, as specified in section 2.2.6.

  19. pConfigurationInfo.advancedConfig.ulSize MUST be set with the size, in bytes, of the W32TIME_CONFIGURATION_ADVANCED structure.

  20. pConfigurationInfo.advancedConfig.ulFrequencyCorrectRate MUST be set to the FrequencyCorrectRate data element value (section 3.2.1.1).

  21. pConfigurationInfo.advancedConfig.ulPollAdjustFactor MUST be set to the PollAdjustFactor data element value (section 3.2.1.1).

  22. pConfigurationInfo.advancedConfig.ulLargePhaseOffset MUST be set to the LargePhaseOffset data element value (see [MS-SNTP] section 3.1.1).

  23. pConfigurationInfo.advancedConfig.ulSpikeWatchPeriod MUST be set to the SpikeWatchPeriod data element value (see [MS-SNTP] section 3.1.1).

  24. pConfigurationInfo.advancedConfig.ulLocalClockDispersion MUST be set to Root Dispersion (sys.rootdispersion), as specified in [RFC1305] section 3.2.1, "Common Variables".

  25. pConfigurationInfo.advancedConfig.ulHoldPeriod MUST be set to the HoldPeriod data element value (see [MS-SNTP] section 3.1.1).

  26. pConfigurationInfo.advancedConfig.ulPhaseCorrectRate MUST be set to the PhaseCorrectRate data element value (section 3.2.1.1).

  27. pConfigurationInfo.advancedConfig.ulUpdateInterval MUST be set to the UpdateInterval data element value (section 3.2.1.1).

  28. pConfigurationInfo.advancedConfig.ulFrequencyCorrectRateFlag MUST be set to an integer indicating the type of the configuration setting for ulFrequencyCorrectRate, as specified in section 2.2.6.

  29. pConfigurationInfo.advancedConfig.ulPollAdjustFactorFlag MUST be set to an integer indicating the type of the configuration setting for ulPollAdjustFactor, as specified in section 2.2.6.

  30. pConfigurationInfo.advancedConfig.ulLargePhaseOffsetFlag MUST be set to an integer indicating the type of the configuration setting for ulLargePhaseOffset, as specified in section 2.2.6.

  31. pConfigurationInfo.advancedConfig.ulSpikeWatchPeriodFlag MUST be set to an integer indicating the type of the configuration setting for ulSpikeWatchPeriod, as specified in section 2.2.6.

  32. pConfigurationInfo.advancedConfig.ulLocalClockDispersionFlag MUST be set to an integer indicating the type of the configuration setting for ulLocalClockDispersion, as specified in section 2.2.6.

  33. pConfigurationInfo.advancedConfig.ulHoldPeriodFlag MUST be set to an integer indicating the type of the configuration setting for ulHoldPeriod, as specified in section 2.2.6.

  34. pConfigurationInfo.advancedConfig.ulPhaseCorrectRateFlag MUST be set to an integer indicating the type of the configuration setting for ulPhaseCorrectRate, as specified in section 2.2.6.

  35. pConfigurationInfo.advancedConfig.ulUpdateIntervalFlag MUST be set to an integer indicating the type of the configuration setting for ulUpdateInterval, as specified in section 2.2.6.

  36. pConfigurationInfo.defaultConfig.ulSize MUST be set with the size, in bytes, of the W32TIME_CONFIGURATION_DEFAULT structure.

  37. pConfigurationInfo.defaultConfig.wszFileLogName MUST be set to the FileLogName data element value (section 3.2.1.1).

  38. pConfigurationInfo.defaultConfig.wszFileLogEntries MUST be set to the FileLogEntries data element value (section 3.2.1.1).

  39. pConfigurationInfo.defaultConfig.ulFileLogSize MUST be set to the FileLogSize data element value (section 3.2.1.1).

  40. pConfigurationInfo.defaultConfig.ulFileLogFlags MUST be set to the FileLogFlags data element value (section 3.2.1.1).

  41. pConfigurationInfo.defaultConfig.ulFileLogNameFlag MUST be set to an integer indicating the type of the configuration setting for wszFileLogName, as specified in section 2.2.6.

  42. pConfigurationInfo.defaultConfig.ulFileLogEntriesFlag MUST be set to an integer indicating the type of the configuration setting for wszFileLogEntries, as specified in section 2.2.6.

  43. pConfigurationInfo.defaultConfig.ulFileLogSizeFlag MUST be set to an integer indicating the type of the configuration setting for ulFileLogSize, as specified in section 2.2.6.

  44. pConfigurationInfo.defaultConfig.ulFileLogFlagsFlag MUST be set to an integer indicating the type of the configuration setting for ulFileLogFlags, as specified in section 2.2.6.

  45. pConfigurationInfo.cProviderConfig MUST be set with the number of time providers found in the TimeProviderList data element (section 3.2.1.1).

  46. For each time provider in TimeProviderList, the server MUST provide a W32TIME_CONFIGURATION_PROVIDER element in pConfigurationInfo.pProviderConfig, as specified in section 3.2.5.9.1.

  47. pConfigurationInfo.cEntries MUST be set to 0.

  48. pConfigurationInfo.pEntries MUST be set to NULL.