Partager via


IWindowsUpdateAgentInfo::GetInfo method

Retrieves version information about Windows Update Agent (WUA).

Syntax

HRESULT GetInfo(
  [in]  VARIANT varInfoIdentifier,
  [out] VARIANT *retval
);

Parameters

  • varInfoIdentifier [in]
    A literal string value that specifies the type of information that the retval parameter returns. The following table lists the current possible string values.

    ApiMajorVersion Retrieves the current major version of WUA.
    ApiMinorVersion Retrieves the current minor version of WUA.
    ProductVersionString Retrieves the file version of the Wuapi.dll file in string format.

     

  • retval [out]

    • Returns the major version of the WUA API as a LONG value within the VARIANT variable if the value of the varInfoIdentifier parameter is ApiMajorVersion.
    • Returns the minor version of the WUA API as a LONG value within the VARIANT variable if the value of varInfoIdentifier is ApiMinorVersion.
    • Returns the file version of the Wuapi.dll file as a BSTR value within the VARIANT variable if the value of varInfoIdentifier is ProductVersionString.

    Note  The format of a returned string is as follows: "<Windows-major-version>.<Windows-minor-version>.<build>.<update>".

     

Return value

Returns S_OK if successful. Otherwise, returns a COM or Windows error code.

Remarks

The IWindowsUpdateAgentInfo interface may require you to update WUA. For more information, see Updating Windows Update Agent.

The major version is incremented one time for each release if a change occurs in the interfaces of the WUA API. The minor version is incremented one time for each release if a change occurs in the existing interfaces of the WUA API.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional with SP3 [desktop apps only]

Minimum supported server

Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only]

Header

Wuapi.h

IDL

Wuapi.idl

Library

Wuguid.lib

DLL

Wuapi.dll

See also

IWindowsUpdateAgentInfo