cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Maldon
Level 2

Agent API - C++ UpdateEvents

Hopefully someone can respond to this.

I'm using C++ and I'm trying to download an update using the API, but it doesn't look like I'm receiving any of the Update events.

Does anyone have a sample project in C++ that I can see to make sure my code isn't completely messed up?

Due to the lack of information in the API, I had to bolt mine together from various 3+ year old comments in random newsboards. It's been fun.

: /
0 Kudos
(1) Reply
erizet
Level 2

Hi,

I'm also trying to get the update events from the API, using bits and pieces of code I found in the community.
I am trying to do it like this:

// Receive events ... 
if(!SUCCEEDED(spUpdate.CoCreateInstance(CLSID_Updates))) {
AfxMessageBox("Error creating update");
}

if(!SUCCEEDED(CComObject::CreateInstance&m_UpdateEventSink))) {
AfxMessageBox("Error creating update sink");
}

m_UpdateEventSink->Start(spUpdate);


//Create agent and get updates
if (SUCCEEDED(spAgent.CoCreateInstance(CLSID_Agent)))
{

//...AutoUpdate etc


What happens is that spUpdate fails to create...
What am I doing wrong here?

By the way the agent works and it fetches the update (not silently yet but thats another issue:)


Maldon have you gotten this far?


Best regards,

Erik
0 Kudos