View Single Post
Old 22.12.2006, 13:37   #16
zlopi
Архивный участник
 
Join Date: Sep 2006
Posts: 31
Default

Quote:
Originally Posted by humordwarf View Post
hd_abs part source
Code:
    exename := ExtractFilePath(paramstr(0)) + 'l2.exe';
    dllname := ExtractFilePath(paramstr(0)) + 'patch32.dll';
    If (Not FileExists(exename)) or (Not FileExists(dllname)) Then
    begin
        MessageBox(0, 'Error #3703: Can''t find game.', 'Error', MB_OK + MB_ICONSTOP);
        halt;
    end;
any other questions? %)
Code:
...
CreateProcess (0,exename);
i:=60;
while h=0 or i!=0 do 
begin
Sleep(1000);
h:=FindWindow('l2UnrealWWindowsViewportWindow','Lineage II');
i:=i-1;
end;
If h=0 Then    
 begin
  MessageBox(0, 'Error #3701: Can't run game.', 'Error', MB_OK + MB_ICONSTOP);
end;
If i=0 Then
 begin
  MessageBox(0, 'Error #3702: Can't run game.', 'Error', MB_OK + MB_ICONSTOP);
 halt;
end;
LoadLibrary = (GetProcAddress(GetModuleHandle("kernel32.dll"),"LoadLibrary");
ExitThread = (GetProcAddress(GetModuleHandle("kernel32.dll"),"ExitThread");
...
Already understood. Well done
Answer my PM
zlopi is offline