⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imgwalk.dpr

📁 < windos核心编程>>是经典中的经典,书中原代码是用delphi重新编写的.
💻 DPR
字号:
library ImgWalk;

uses Windows;

var
  szBuf: array[0..MAX_PATH * 100] of Char = '';
  szEnd: PAnsiChar = szBuf;
  szModName: array[0..MAX_PATH] of Char;
  mbi: TMemoryBasicInformation;
  pb: PByte = nil;
  nLen: Integer;
  ArgList: array[1..2] of PChar;
begin
  while (VirtualQuery(pb, mbi, SizeOf(TMemoryBasicInformation)) = SizeOf(TMemoryBasicInformation)) do
  begin
    if (mbi.State = MEM_FREE) then mbi.AllocationBase := mbi.BaseAddress;

    if (DWORD(mbi.AllocationBase) = HInstance) or
       (mbi.AllocationBase <> mbi.BaseAddress) or
       (mbi.AllocationBase = nil) then
      nLen := 0
    else
      nLen := GetModuleFileNameA(DWORD(mbi.AllocationBase), szModName, MAX_PATH);

    if (nLen > 0) then
    begin
      ArgList[1] := mbi.AllocationBase;
      ArgList[2] := szModName;
      Inc(szEnd, wvsprintfA(szEnd, #13#10'%p-%s', @ArgList));
    end;

    Inc(pb, mbi.RegionSize);
  end;

  MessageBox(0, szBuf, 'ImgWalk', MB_OK);
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -