BOOL WINAPI RefreshPolicyEx(IN BOOL bMachine, IN DWORD dwOptions) { if (dwOptions & ~RP_FORCE) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } if (dwOptions & RP_FORCE) { HANDLE hEvent; BOOL Ret = TRUE; hEvent = OpenEventW(EVENT_MODIFY_STATE, FALSE, (bMachine ? szMachineGPForceRefreshEvent : szLocalGPForceRefreshEvent)); if (hEvent != NULL) { Ret = SetEvent(hEvent); CloseHandle(hEvent); } /* return TRUE even if the mutex doesn't exist! */ return Ret; } else { return RefreshPolicy(bMachine); } }
FlowControlDlg::FlowControlDlg(Target* tar) : QDialog(0) , m_curTarget(tar) { ui.setupUi(this); this->setWindowFlags(Qt::Dialog | Qt::WindowTitleHint); connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(RefreshPolicy())); DWORD preValue = DM->QueryTargetPluginStatus(m_curTarget->dwTargetID); ui.chkPlg1->setChecked(PLUGIN_ENABLE_1 & preValue); ui.chkPlg2->setChecked(PLUGIN_ENABLE_2 & preValue); ui.chkPlg4->setChecked(PLUGIN_ENABLE_4 & preValue); }