Курсовая работа: Характеристика Win32
OnViewRefresh();
}
// –
// OnOptionsEnumprocWmi_Update
void
CMainFrame: OnOptionsEnumprocWmi_Update (
CCmdUI * pCmdUI
)
{
_ASSERTE (pCmdUI!= NULL);
pCmdUI->Enable (m_bWmiAvailable!= NULL);
pCmdUI->SetRadio (m_nEnumProcMethod == ENUMPROCESSES_WMI);
}
// –
// OnOptionsDebug
void
CMainFrame: OnOptionsDebug()
{
TOKEN_PRIVILEGES tkp;
tkp. PrivilegeCount = 1;
LookupPrivilegeValue (NULL, SE_DEBUG_NAME, &tkp. Privileges[0].Luid);
HANDLE hToken;
if (OpenProcessToken (GetCurrentProcess(), ЕOKEN_QUERY|TOKEN_ADJUST_PRIVILEGES,&hToken))
{
AdjustTokenPrivileges (hToken, FALSE, &tkp, sizeof(tkp), NULL, NULL);
CloseHandle(hToken);
}
OnViewRefresh();
}