I'm trying to get the last windows update check using wuapi. I have the following code:
VARIANT variant;
VariantInit(&variant);
IAutomaticUpdatesResults* pAutomaticUpdatedResults = NULL;
if (pAutomaticUpdatedResults->get_LastSearchSuccessDate(&variant) != S_OK)
throw;
std::cout << variant.date << std::endl;
Understandably I get an exception that pAutomaticUpdatedResults is uninitialized but I'm not sure on the correct way to use the wuapi