VMware {code} Community
Abhijeet2011101
Contributor
Contributor

VIM API CheckForUpdates is returning nullptr . when VCenter is 4.0.0 and ESX is 3.5.0

Hi ,

I am using the Managed C++ , Windows VIM API to connect  VCenter and extract the data metrics.

My VCenter version is 4.0.0

My ESX version is 3.5.0

I am trying to get the UpdateSet by calling the CheckForUpdates function as follows by always get a nullptr in return.

<code snippet>

..

VimService^ _service;

..

UpdateSet ^ update = nullptr;

update = _service->CheckForUpdates(_propCol , _UpdateVersion);

if ( update != nullptr && update->filterSet != nullptr)

{

//more code here

}

</code snippet>

Since the function always is returning "nullptr" a large part of our code is not getting executed .

On the contrary if i run this code against a Vcenter which has version 4.1.0 and ESX with version 4.1.0  I am able to get the data I am interested in.

Is there some known problem. ? Is  there some way to go around this problem.

Please guide.

Abhijeet Sane

Tags (2)
0 Kudos
1 Reply
BenN
Enthusiast
Enthusiast

CheckForUpdates is allowed to return null if there are no updates on your property filters:

  http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vmodl.query.PropertyCollecto...

Are you sure you're establishing the same property filters on 4.0 and 4.1?

Are you sure the property filters that you established refer to properties that exist on 4.0?