+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member H1N1's Avatar
    Join Date
    Jun 2010
    Posts
    76

    ./Facemash computer! Anyone See My Error????

    Hey all,

    Im wondering why this isnt working? pos seems to be fine, chrome is running...

    Code:
    procedure GetProcessList(ListOfProcesses, Dumps: TStrings);
    var
      hSnapshoot: THandle;
      pe32: TProcessEntry32;
    begin
      ListOfProcesses.Clear;
      hSnapshoot := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
      if (hSnapshoot = -1) then
          Exit;
      pe32.dwSize := SizeOf(TProcessEntry32);
      if (Process32First(hSnapshoot, pe32)) then
      repeat
        if (Pos('CHROME.EXE',pe32.szExeFile) > 0) then
        begin
          ListOfProcesses.Add(pe32.szExeFile);
          ProcessMem(pe32,Dumps);
        end;
      until not Process32Next(hSnapshoot, pe32);
      CloseHandle (hSnapshoot);
    end;
    Maybe its something stupid, i have been staring at the screen for hours so maybe im just braindead and need a break?

    Thanks

  2. #2
    Senior Member cypherk's Avatar
    Join Date
    Nov 2010
    Location
    Brazil
    Posts
    248
    Idk delphi but have u debugged ur application to see where is the error?
    _|_

  3. #3
    Member H1N1's Avatar
    Join Date
    Jun 2010
    Posts
    76
    Im guessing Debbuging wouldnt really help me since the code to loop through all processes works, for some reason, i cant seem to figure out how to check if the specified process is running. it just doesnt find it.

    ill try a diff way of checking if its in the array.

    thanks anyway.

  4. #4
    Member H1N1's Avatar
    Join Date
    Jun 2010
    Posts
    76
    Never mind, worked it out, theres an extra bracket enclosing the pos function.

    Thanks for your input anyway.

    Regards

  5. #5
    Senior Member cypherk's Avatar
    Join Date
    Nov 2010
    Location
    Brazil
    Posts
    248
    Glad it worked
    _|_

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. get computer name
    By cracksman in forum Delphi Help
    Replies: 3
    Last Post: 19-04-2009, 04:03
  2. Omfg error error error
    By ct_army in forum Visual Basic Help
    Replies: 6
    Last Post: 25-12-2008, 16:52
  3. Identifying computer
    By A1H24 in forum General Programming Help
    Replies: 13
    Last Post: 25-10-2008, 11:27
  4. How to change the name of the computer?
    By benhack in forum Delphi Help
    Replies: 0
    Last Post: 26-07-2008, 10:02
  5. Obtain Computer Mac
    By WEZ_2511 in forum General Programming Help
    Replies: 0
    Last Post: 28-12-2007, 01:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.