Udostępnij za pośrednictwem


GetProviderVersion Method in Class SMS_Identification

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

In Configuration Manager, the GetProviderVersion Windows Management Instrumentation (WMI) class method gets the product version string from the version resources of the SMS Provider DLL.

The following syntax is simplified from Managed Object Format (MOF) code and is intended to show the definition of the method.

SInt32 GetProviderVersion(
      String VersionString
);

Parameters

  • VersionString
    Data type: String

    Qualifiers: [out]

    Product version string from the version resources of the Smsprov.dll file.

Return Values

An SInt32 data type that is 0 to indicate success or non-zero to indicate failure.

For information about handling returned errors, see About Configuration Manager Errors.

Remarks

The version that is obtained by this method allows your application to determine whether the SMS Provider has had a hotfix applied.

Example Code

The following example shows how to call this method to get the version number of the SMS Provider.

Dim Identification As SWbemObject
Dim ProviderVersion As String

Set Identification = GetObject("winmgmts:\root\sms\site_<sitecode>:SMS_Identification")
Identification.GetProviderVersion ProviderVersion

MsgBox "Version = " & ProviderVersion

Requirements

Runtime Requirements

For more information, see Configuration Manager Server Runtime Requirements.

Development Requirements

For more information, see Configuration Manager Server Development Requirements.

See Also

Concepts

SMS_Identification Server WMI Class