本文整理汇总了C++中MMap::GetNext方法的典型用法代码示例。如果您正苦于以下问题:C++ MMap::GetNext方法的具体用法?C++ MMap::GetNext怎么用?C++ MMap::GetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MMap
的用法示例。
在下文中一共展示了MMap::GetNext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GenerateTreeDebugBreak
void GenerateTreeDebugBreak(DWORD nExcludePID)
{
_ASSERTE(gpSrv->DbgInfo.bDebugProcessTree);
DWORD dwErr = 0;
HMODULE hKernel = GetModuleHandle(L"kernel32.dll");
typedef BOOL (WINAPI* DebugBreakProcess_t)(HANDLE Process);
DebugBreakProcess_t DebugBreakProcess_f = (DebugBreakProcess_t)(hKernel ? GetProcAddress(hKernel, "DebugBreakProcess") : NULL);
if (DebugBreakProcess_f)
{
_printf("ConEmuC: Sending DebugBreak event to processes:");
DWORD nPID = 0; HANDLE hProcess = NULL;
MMap<DWORD,CEDebugProcessInfo>* pDebugTreeProcesses = gpSrv->DbgInfo.pDebugTreeProcesses;
CEDebugProcessInfo pi = {};
if (pDebugTreeProcesses->GetNext(NULL, &nPID, &pi))
{
while (nPID)
{
if (nPID != nExcludePID)
{
_printf(" %u", nPID);
if (!pi.hProcess)
{
pi.hProcess = GetProcessHandleForDebug(nPID);
}
if (DebugBreakProcess_f(pi.hProcess))
{
gpSrv->DbgInfo.nWaitTreeBreaks++;
}
else
{
dwErr = GetLastError();
_printf("\nConEmuC: Sending DebugBreak event failed, Code=x%X\n", dwErr);
}
}
if (!pDebugTreeProcesses->GetNext(&nPID, &nPID, &pi))
break;
}
_printf("\n");
}
}
else
{
_printf("ConEmuC: DebugBreakProcess not found in kernel32.dll\n");
}
}