Welcome to ServerForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Search problem with WUA API.

 
   Windows Server (Home) -> Windows Server Update Services RSS
Next:  Clients not showing up and not updating  
Author Message
VadimS

External


Since: Jul 11, 2005
Posts: 5



(Msg. 1) Posted: Mon Jul 11, 2005 12:09 am
Post subject: Search problem with WUA API.
Archived from groups: microsoft>public>windows>server>update_services (more info?)

Good day, all.

I come into collsion with searches via WUA API. Please help me to resolve
this issue.

I get accessible updates with help the following code:
.........
IUpdateSession* pSession = NULL;
HRESULT hr = ::CoCreateInstance(CLSID_UpdateSession, NULL,
CLSCTX_LOCAL_SERVER, IID_IUpdateSession, (void**)&pSession);

IUpdateSearcher* pSearcher = NULL;
hr = pSession->CreateUpdateSearcher(&pSearcher);

BSTR bstrSearchCriteria = L"IsInstalled=0 and Type='Software'";

ISearchResult* pSearchResult = NULL;
hr = pSearcher->Search(bstrSearchCriteria, &pSearchResult);

IUpdateCollection* pUpdateCollection = NULL;
hr = pSearchResult->get_Updates(&pUpdateCollection);
..........

Next, i save the identity (UpdateID) property for one element from
collection. Then i write a new program. That program is identically with
previous with the exception of the search string. Now i use the following:
BSTR bstrCriteria = L"UpdateID='6f5dc828-0f05-4577-9a8a-74ab1cbe00a9'";
(GUID is previously saved UpdateID).

I think that get_Updates method will return 1 element on basis of that
criteria. But when i check number of elements by get_Count method, I take
number of elements as in previously programm, not 1.

What i do wrong?

Best regards, Vadim

 >> Stay informed about: Search problem with WUA API. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Always problem with Clients - Hi :) Two days ago I removed complete install of WSUS RC, WMSDE and store folder. In that moment 94 clients was reported to WSUS (15 more still not show up in WSUS.) Installed WSUS final version on same W2K3 EE server which is PDC and yesterday 27..

WSUS Grouping Problem - Hi, I am using windows 2k svr for setting up the WSUS and not using active directory. I have a fewer question about the update service and would like if any one can kindly answer my question. First, I would like to know when I group the computers in...

client service problem - Hi folks Just been checking some clients that arent communicating with wsus server and ran the client diagnostic tool. It reported back that the clients' auto update service is missing !. Does anyone know how I can (re) install the auto update service ?....

WSUS Install problem - Helo, Any help would be appreciated! I'm trying to install WSUS on a domaincontroller, but installation fails with mesage: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. In the....

Supersedes problem (MS05-025) - I posted this yesterday to another group, which I think was probably the wrong one. Looking at the recently released patches in WSUS, I can see what looks like a problem. In the Updates view, MS05-025 - Cumulative Security Update for Internet Explorer...
   Windows Server (Home) -> Windows Server Update Services All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]