Results 1 to 4 of 4
  1. #1
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool

    [Help]Isolate new ID in a Int32 array[Solved]

    talkin ps3 so can say much


    ok i have an array of int32 . (processids of processes with the same name)

    what i want is it i start an other process with the same name i will like the id of the new process only......


    example...
    I have 2 notepads open.
    i have the IDs of those two
    then i start another notepad...Iwill like that ID only.
    and if i close a notepad
    no ids show as a side effect

    I have tryed and fail.when something new comes up the old ids still show

    thank you

    ps: I am getting good at this ps3 typing thing
    Last edited by topblast; 12-17-2010 at 09:10 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  2. #2
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    [php]
    Dim latestID As Int32 = 0
    Dim FirstIDs() As Int32 = Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID)
    'open new notepad'
    Dim IDenum As iEnumerable(Of Int32) = (From x As Int32 In Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID) Where Not FirstIDs.Contains(x) Select x)
    If IDenum.Count > 0 then latestID = IDenum(0)
    [/php]

    Somefing like that.

    Of course, you might need to split this into separate parts to do what you need, but this will isolate the new ID.
    Last edited by Jason; 12-17-2010 at 09:29 PM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  3. The Following User Says Thank You to Jason For This Useful Post:

    topblast (12-17-2010)

  4. #3
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by Jason View Post
    [php]
    Dim latestID As Int32 = 0
    Dim FirstIDs() As Int32 = Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID)
    'open new notepad'
    Dim IDenum As iEnumerable(Of Int32) = (From x As Int32 In Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID) Where Not FirstIDs.Contains(x) Select x)
    If IDenum.Count > 0 then latestID = IDenum(0)
    [/php]

    Somefing like that.

    Of course, you might need to split this into separate parts to do what you need, but this will isolate the new ID.
    thanks its works. mine was a lost more code for almost the same result

    up from 2am til 6.30am doing this thanks again
    Last edited by topblast; 12-17-2010 at 10:31 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  5. #4
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by topblast View Post


    thanks its works. mine was a lost more code for almost the same result

    up from 2am til 6.30am doing this thanks again
    Not a problem, glad I could help.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  6. The Following User Says Thank You to Jason For This Useful Post:

    topblast (12-18-2010)