Lines Matching refs:hr
46 HRESULT hr = CoCreateInstance(__uuidof(NetFwMgr),
50 if (SUCCEEDED(hr) && (mgr_ != NULL))
51 hr = mgr_->get_LocalPolicy(&policy_);
52 if (SUCCEEDED(hr) && (policy_ != NULL))
53 hr = policy_->get_CurrentProfile(&profile_);
56 *result = hr;
57 return SUCCEEDED(hr) && (profile_ != NULL);
91 HRESULT hr = profile_->get_AuthorizedApplications(&apps);
92 if (SUCCEEDED(hr) && (apps != NULL)) {
94 hr = apps->Item(bfilename, &app);
95 if (SUCCEEDED(hr) && (app != NULL)) {
97 hr = app->get_Enabled(&fwEnabled);
100 if (SUCCEEDED(hr)) {
104 } else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) {
129 HRESULT hr = profile_->get_AuthorizedApplications(&apps);
130 if (SUCCEEDED(hr) && (apps != NULL)) {
132 hr = CoCreateInstance(__uuidof(NetFwAuthorizedApplication),
136 if (SUCCEEDED(hr) && (app != NULL)) {
138 hr = app->put_ProcessImageFileName(bstr);
140 if (SUCCEEDED(hr))
141 hr = app->put_Name(bstr);
142 if (SUCCEEDED(hr))
143 hr = app->put_Enabled(authorized ? VARIANT_TRUE : VARIANT_FALSE);
144 if (SUCCEEDED(hr))
145 hr = apps->Add(app);
151 *result = hr;
152 return SUCCEEDED(hr);