Lines Matching refs:chk
84 #define chk(status) _chk(hr, status, "Failed to " #status, out) macro
113 chk(CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, in GetAdminName()
115 chk(pLoc->ConnectServer(_bstr_t(L"ROOT\\CIMV2"), NULL, NULL, NULL, in GetAdminName()
117 chk(CoSetProxyBlanket(pSvc, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, in GetAdminName()
120 chk(pSvc->ExecQuery(_bstr_t(L"WQL"), in GetAdminName()
130 chk(pEnum->Next(WBEM_INFINITE, 1, pWobj.replace(), &returned)); in GetAdminName()
137 chk(pWobj->Get(_bstr_t(L"Name"), 0, &var, 0, 0)); in GetAdminName()
195 chk(CoCreateInstance(CLSID_COMAdminCatalog, NULL, CLSCTX_INPROC_SERVER, in QGAProviderFind()
197 chk(pUnknown->QueryInterface(IID_ICOMAdminCatalog2, in QGAProviderFind()
199 chk(pCatalog->GetCollection(_bstr_t(L"Applications"), in QGAProviderFind()
201 chk(pColl->Populate()); in QGAProviderFind()
203 chk(pColl->get_Count(&n)); in QGAProviderFind()
205 chk(pColl->get_Item(i, (IDispatch **)pObj.replace())); in QGAProviderFind()
206 chk(pObj->get_Value(_bstr_t(L"Name"), &var)); in QGAProviderFind()
213 chk(pColl->SaveChanges(&n)); in QGAProviderFind()
238 chk(coll->Remove(i)); in QGAProviderRemove()
253 chk(QGAProviderFind(QGAProviderRemove, NULL)); in COMUnregister()
288 chk(QGAProviderFind(QGAProviderCount, (void *)&count)); in COMRegister()
295 chk(CoCreateInstance(CLSID_COMAdminCatalog, NULL, CLSCTX_INPROC_SERVER, in COMRegister()
297 chk(pUnknown->QueryInterface(IID_ICOMAdminCatalog2, in COMRegister()
302 chk(pCatalog->GetCollection(_bstr_t(L"Applications"), in COMRegister()
304 chk(pApps->Populate()); in COMRegister()
305 chk(pApps->Add((IDispatch **)&pObj)); in COMRegister()
306 chk(put_Value(pObj, L"Name", QGA_PROVIDER_LNAME)); in COMRegister()
307 chk(put_Value(pObj, L"Description", QGA_PROVIDER_LNAME)); in COMRegister()
308 chk(put_Value(pObj, L"ApplicationAccessChecksEnabled", true)); in COMRegister()
309 chk(put_Value(pObj, L"Authentication", short(6))); in COMRegister()
310 chk(put_Value(pObj, L"AuthenticationCapability", short(2))); in COMRegister()
311 chk(put_Value(pObj, L"ImpersonationLevel", short(2))); in COMRegister()
312 chk(pApps->SaveChanges(&n)); in COMRegister()
317 chk(pObj->get_Key(&key)); in COMRegister()
340 chk(pCatalog->CreateServiceForApplication( in COMRegister()
344 chk(pCatalog->InstallComponent(_bstr_t(QGA_PROVIDER_LNAME), in COMRegister()
350 chk(getNameByStringSID(administratorsGroupSID, buffer, &bufferLen)); in COMRegister()
351 chk(pApps->GetCollection(_bstr_t(L"Roles"), key, in COMRegister()
353 chk(pRoles->Populate()); in COMRegister()
354 chk(pRoles->Add((IDispatch **)pObj.replace())); in COMRegister()
355 chk(put_Value(pObj, L"Name", buffer)); in COMRegister()
356 chk(put_Value(pObj, L"Description", L"Administrators group")); in COMRegister()
357 chk(pRoles->SaveChanges(&n)); in COMRegister()
358 chk(pObj->get_Key(&key)); in COMRegister()
362 chk(pRoles->GetCollection(_bstr_t(L"UsersInRole"), key, in COMRegister()
364 chk(pUsersInRole->Populate()); in COMRegister()
366 chk(pUsersInRole->Add((IDispatch **)pObj.replace())); in COMRegister()
367 chk(GetAdminName(&name)); in COMRegister()
368 chk(put_Value(pObj, L"User", _bstr_t(".\\") + name)); in COMRegister()
371 chk(getNameByStringSID(systemUserSID, buffer, &bufferLen)); in COMRegister()
372 chk(pUsersInRole->Add((IDispatch **)pObj.replace())); in COMRegister()
373 chk(put_Value(pObj, L"User", buffer)); in COMRegister()
374 chk(pUsersInRole->SaveChanges(&n)); in COMRegister()