閺€鎯版 (0) +1 鐠э拷 (0) +1 闊拷 (0) +1
閺€鎯版閹存劕濮�閺屻儳婀呴弨鎯版>>

正在阅读:VC++中如何获取进程模块的信息VC++中如何获取进程模块的信息

2004-03-19 10:39 出处:CSDN 作者:taianmonkey 责任编辑:linjixiong

  // Fill the size of the structure before using it.

  me32.dwSize = sizeof(MODULEENTRY32);

  // Walk the module list of the process, and find the module of
  // interest. Then copy the information to the buffer pointed
  // to by lpMe32 so that it can be returned to the caller.

  if (Module32First(hModuleSnap, &me32))
  {
  do
  {
  if (me32.th32ModuleID == dwModuleID)
  {
  CopyMemory (lpMe32, &me32, cbMe32);
  bFound = TRUE;
  }
  }
  while (!bFound && Module32Next(hModuleSnap, &me32));

  bRet = bFound; // if this sets bRet to FALSE, dwModuleID
  // no longer exists in specified process
  }
  else
  bRet = FALSE; // could not walk module list

  // Do not forget to clean up the snapshot object.

  CloseHandle (hModuleSnap);

  return (bRet);
  }

  三、提高权限:

  BOOL EnableDebugPrivilege()



察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品
閹靛婧€鐠佸潡妫�閸ョ偛鍩屾い鍫曞劥