Valhalla Legends Forums Archive | C/C++ Programming | Console tab stops?

AuthorMessageTime
BreW
[img]http://img165.imageshack.us/img165/5741/97192591lf7.gif[/img]
How would I fix the shwiconEM.exe and vmnetdhcp.exe lines' disalignment? I figure I can do it by setting my own tab stops, but how? The output looks so messy. Right now I'm using two \t's.
October 23, 2007, 11:50 AM
rabbit
It ain't dynamic.  Get over it.
October 23, 2007, 12:03 PM
devcode
[quote author=rabbit link=topic=17131.msg174144#msg174144 date=1193140991]
It ain't dynamic.  Get over it.
[/quote]
Use CSuperBrewProcessListerTabs, shits fyre
October 23, 2007, 1:37 PM
iago
The best way is probably to use printf()-style formatting parameters (you can do it in C++ too, but I don't know how)

printf("%32s %d\n");

That'll print the string in a 32-character column. I forget whether it aligns the string left or right, but you can probably play around with it and get it right.

The other option is to manually do it:
int i;
printf("%s", str);
for(i = 0; i < 32 - strlen(str); i++)
  printf(" ");
printf("\n");

There's probably a better way to do that, but whatever. :)
October 23, 2007, 1:52 PM
BreW
[quote author=iago link=topic=17131.msg174147#msg174147 date=1193147521]
The best way is probably to use printf()-style formatting parameters (you can do it in C++ too, but I don't know how)

printf("%32s %d\n");

That'll print the string in a 32-character column. I forget whether it aligns the string left or right, but you can probably play around with it and get it right.

The other option is to manually do it:
int i;
printf("%s", str);
for(i = 0; i < 32 - strlen(str); i++)
  printf(" ");
printf("\n");

There's probably a better way to do that, but whatever. :)
[/quote]
You were right-- it alligns to the right, i wonder how i would get it to the left? (actually i dont think i can :/) So yeah, padding it with spaces for every char it doesn't take up is the best idea. Thanks for helping.
October 23, 2007, 2:59 PM
JoeTheOdd
C# was the last language I remember you to brown-nose. If not, port it yourself.

[code]using System;
using System.Collections.Generic;
using System.Text;

namespace StringPadding
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("String padder");
            Console.WriteLine("A Joe[x86] Production!");
            Console.WriteLine();
            Console.WriteLine(padStringRight("Brew is an idiot.", 'x', 32));
            Console.WriteLine();
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }

        private static string padStringRight(string data, char padding, int length)
        {
            if (data.Length > length)
                throw new ArgumentOutOfRangeException("length", "length parameter is shorter than data's length.");

            char[] ret = new char[length];
            Array.Copy(data.ToCharArray(), ret, data.Length);
            for (int i = data.Length; i < length; i++)
            {
                ret[i] = padding;
            }
            return new String(ret);
        }

    }
}
[/code]
October 23, 2007, 5:01 PM
BreW
[quote author=Joe[x86] link=topic=17131.msg174150#msg174150 date=1193158913]
C# was the last language I remember you to brown-nose. If not, port it yourself.
[/quote]
What? I can't port that, I don't know C# at all. I never coded in C# or anything .NET for that matter, and I intend to never code in any .NET languages in my lifetime. And if you had read my last post you would have found that I've already got it figured out-- I just used a space padder like iago said to. I first learned about a space padder long ago, back when I was making columns for a listbox control in vb. I just never thought of using it for this (i figured sprintf would have something i didn't know about that does this, apparently not)

Also, nice coding practice:
[code]
return new String(ret);
[/code]
Allocating heap memory for a string? And you don't even free it in main(). So what if the program is going to end and it wouldn't matter, it's just not a good idea to do that IMO.
October 23, 2007, 5:27 PM
K
[quote author=brew link=topic=17131.msg174152#msg174152 date=1193160459]
Allocating heap memory for a string? And you don't even free it in main(). So what if the program is going to end and it wouldn't matter, it's just not a good idea to do that IMO.
[/quote]

C# is a garbage collected language.  All classes are allocated using the new keyword, and are disposed of automatically when they are no longer referenced.

[quote author=iago link=topic=17131.msg174147#msg174147 date=1193147521]
The best way is probably to use printf()-style formatting parameters (you can do it in C++ too, but I don't know how)
[/quote]

In C++ you use the stream operators found in the <iomanip> header.  In this case, probably something like:

[code]
using namespace std;
cout << setw(32) << left << "foo" << setw(32) << left << "bar" << endl;
[/code]
October 23, 2007, 5:47 PM
devcode
[quote author=brew link=topic=17131.msg174148#msg174148 date=1193151577]
[quote author=iago link=topic=17131.msg174147#msg174147 date=1193147521]
The best way is probably to use printf()-style formatting parameters (you can do it in C++ too, but I don't know how)

printf("%32s %d\n");

That'll print the string in a 32-character column. I forget whether it aligns the string left or right, but you can probably play around with it and get it right.

The other option is to manually do it:
int i;
printf("%s", str);
for(i = 0; i < 32 - strlen(str); i++)
  printf(" ");
printf("\n");

There's probably a better way to do that, but whatever. :)
[/quote]
You were right-- it alligns to the right, i wonder how i would get it to the left? (actually i dont think i can :/) So yeah, padding it with spaces for every char it doesn't take up is the best idea. Thanks for helping.
[/quote]

np looking to help anytime!
October 23, 2007, 6:01 PM
BreW
[quote author=devcode link=topic=17131.msg174154#msg174154 date=1193162498]
np looking to help anytime!
[/quote]
I'm pretty sure I was talking to iago
@K: I don't want to use any C++. I , personally, hate classes or anything OO of that sort.
October 23, 2007, 6:42 PM
Quarantine
[quote author=brew link=topic=17131.msg174155#msg174155 date=1193164921]
[quote author=devcode link=topic=17131.msg174154#msg174154 date=1193162498]
np looking to help anytime!
[/quote]
I'm pretty sure I was talking to iago
@K: I don't want to use any C++. I , personally, hate classes or anything OO of that sort.
[/quote]

what
October 23, 2007, 7:28 PM
K
[quote author=brew link=topic=17131.msg174148#msg174148 date=1193151577]
[quote author=iago link=topic=17131.msg174147#msg174147 date=1193147521]
The best way is probably to use printf()-style formatting parameters (you can do it in C++ too, but I don't know how)

printf("%32s %d\n");

That'll print the string in a 32-character column. I forget whether it aligns the string left or right, but you can probably play around with it and get it right.

The other option is to manually do it:
int i;
printf("%s", str);
for(i = 0; i < 32 - strlen(str); i++)
  printf(" ");
printf("\n");

There's probably a better way to do that, but whatever. :)
[/quote]
You were right-- it alligns to the right, i wonder how i would get it to the left? (actually i dont think i can :/) So yeah, padding it with spaces for every char it doesn't take up is the best idea. Thanks for helping.
[/quote]

To align to the left I believe you specify a negative padding number:

printf("%-32s", s);
October 23, 2007, 7:37 PM
Myndfyr
[quote author=Joe[x86] link=topic=17131.msg174150#msg174150 date=1193158913]
C# was the last language I remember you to brown-nose. If not, port it yourself.
[/quote]
Joe, first of all that's not the right approach, and even if it was, C# already has String.PadLeft and String.PadRight methods that work on the instances of the strings they're changing.

The proper way to do it would be to use formatting strings.  Format strings allow an alignment property to be set:
[code]
using System;
using System.Diagnostics;
using System.IO;
using System.ComponentModel;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine();
        Console.WriteLine("            ===={ Process Viewer }====");
        Console.WriteLine();
        Console.WriteLine("  {0,24}{1,10}", "Image Name", "  ID ");
        Console.WriteLine();
        Process[] processes = Process.GetProcesses();
        int threads = 0;
        foreach (Process p in processes)
        {
            try
            {
                Console.WriteLine("  {0,24}{1,10}", Path.GetFileName(p.MainModule.FileName), p.Id);
            }
            catch (Win32Exception)
            {
                Console.WriteLine("  {0,23}*{1,10}", p.ProcessName, p.Id);
            }
            threads += p.Threads.Count;
        }

        Console.WriteLine();
        Console.WriteLine("  Total number of processes: {0}", processes.Length);
        Console.WriteLine("  Total number of threads: {0}", threads);

        Console.ReadLine();
    }
}
[/code]

Note: for processes that do not expose a main module (I was receiving ACCESS_DENIED errors), I have marked them with a * at the end of the process name.

Result:
[img]http://www.jinxbot.net/pub/brew_ps.jpg[/img]

K: that (left alignment) is likely correct.  .NET's formatting was based on C, and that's how you would left-align.
October 23, 2007, 7:43 PM
BreW
[quote author=K link=topic=17131.msg174157#msg174157 date=1193168278]
To align to the left I believe you specify a negative padding number:

printf("%-32s", s);
[/quote]
Oh wow, that's just what i was looking for. :D
Mynd, I've noticed that people call blank writelines in order to space their lines out. Is there no '\n' in C# or something? That'd be pretty sad if there weren't
October 23, 2007, 8:00 PM
iago
"\n" isn't a standard. Windows, for example, uses \r\n. Linux uses \n. iirc, Mac uses \r. So using println() guarantees, in a platform-independent way, that you'll get the proper newline character.

That may seem silly in C#, which is only typically run on Windows, but it's still a good habit. Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
October 23, 2007, 8:07 PM
BreW
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]
I always use \n instead of \r\n :(

Hey, how would i get a handle to the thread of another process?
October 23, 2007, 8:51 PM
devcode
[quote author=brew link=topic=17131.msg174166#msg174166 date=1193172710]
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]
I always use \n instead of \r\n :(

Hey, how would i get a handle to the thread of another process?
[/quote]
www.g00gles.com
October 23, 2007, 9:00 PM
BreW
[quote author=devcode link=topic=17131.msg174167#msg174167 date=1193173255]
[quote author=brew link=topic=17131.msg174166#msg174166 date=1193172710]
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]
I always use \n instead of \r\n :(

Hey, how would i get a handle to the thread of another process?
[/quote]
www.g00gles.com
[/quote]
I lol'd.
October 23, 2007, 9:29 PM
Quarantine
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
"\n" isn't a standard. Windows, for example, uses \r\n. Linux uses \n. iirc, Mac uses \r. So using println() guarantees, in a platform-independent way, that you'll get the proper newline character.

That may seem silly in C#, which is only typically run on Windows, but it's still a good habit. Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]

I think \r just returns the text-cursor to the beginning of whatever row it's on. While \n actually advances it one row.

The good thing about C# is that due to it being a standard, you're able to make certain assumptions about it's implementation across multiple platforms. It's pretty much guaranteed to be the same, as with Java.
October 23, 2007, 10:39 PM
JoeTheOdd
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
"\n" isn't a standard. Windows, for example, uses \r\n. Linux uses \n. iirc, Mac uses \r. So using println() guarantees, in a platform-independent way, that you'll get the proper newline character.

That may seem silly in C#, which is only typically run on Windows, but it's still a good habit. Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]

The proper way to do it in C# is Environment.NewLine, unless you're dealing with the console, in which Console.WriteLine() deals with it for you.
October 24, 2007, 7:20 AM
Myndfyr
[quote author=Joe[x86] link=topic=17131.msg174176#msg174176 date=1193210404]
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
"\n" isn't a standard. Windows, for example, uses \r\n. Linux uses \n. iirc, Mac uses \r. So using println() guarantees, in a platform-independent way, that you'll get the proper newline character.

That may seem silly in C#, which is only typically run on Windows, but it's still a good habit. Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]

The proper way to do it in C# is Environment.NewLine, unless you're dealing with the console, in which Console.WriteLine() deals with it for you.
[/quote]
Not necessarily.  Using Environment.NewLine, which is a string, could potentially require concatenation, which is not kosher (it can become expensive because strings are immutable).  When possible, using a TextWriter's WriteLine or StringBuilder's AppendLine is preferable.
October 24, 2007, 8:35 AM
iago
[quote author=brew link=topic=17131.msg174166#msg174166 date=1193172710]
[quote author=iago link=topic=17131.msg174163#msg174163 date=1193170054]
Plus, people might make silly mistakes like using "\n" instead of "\r\n" :P
[/quote]
I always use \n instead of \r\n :(

Hey, how would i get a handle to the thread of another process?
[/quote]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
October 24, 2007, 3:34 PM
BreW
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
October 24, 2007, 3:51 PM
devcode
[quote author=brew link=topic=17131.msg174179#msg174179 date=1193241091]
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
[/quote]

guess g00gles musta worked out for you. lol @ kernel mode api, thats a good one
October 24, 2007, 4:14 PM
Myndfyr
Out of curiousity, why do you need a handle to an already existing thread?  When hacking a program most people create a thread within the process space.
October 24, 2007, 4:19 PM
devcode
[quote author=MyndFyre[vL] link=topic=17131.msg174181#msg174181 date=1193242792]
Out of curiousity, why do you need a handle to an already existing thread?  When hacking a program most people create a thread within the process space.
[/quote]

Creating a new thread in the remote process is one option but not the only one. You can get control of an existing thread using the GetThreadContext, SetThreadContext APIs and redirect execution. There are many ways to achieve the same thing..........................................
October 24, 2007, 4:55 PM
BreW
[quote author=devcode link=topic=17131.msg174180#msg174180 date=1193242470]
[quote author=brew link=topic=17131.msg174179#msg174179 date=1193241091]
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
[/quote]

guess g00gles musta worked out for you. lol @ kernel mode api, thats a good one
[/quote]
Yes, I was looking into ZwQuerySystemInformation or something like that, I think it returned a pointer to struct in a struct that had a pointer to a list of all the thread ids.
MyndFyre: To pause execution of other programs, ofcourse. I find all the threads associated with the PID, then call SuspendThread on all of them.
October 24, 2007, 5:31 PM
Myndfyr
Isn't it easier to use the debugging APIs?

Note: I don't know the debugging APIs, so this is me speculating.
October 24, 2007, 7:51 PM
iago
[quote author=brew link=topic=17131.msg174179#msg174179 date=1193241091]
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
[/quote]
Ah, the original question was worded funny, "Hey, how would i get a handle to the thread of another process?"

I assumed you wanted to get a handle to the process. What I think you wanted to ask was how to get a handle to a thread in another process.
October 25, 2007, 1:42 AM
devcode
[quote author=iago link=topic=17131.msg174195#msg174195 date=1193276567]
[quote author=brew link=topic=17131.msg174179#msg174179 date=1193241091]
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
[/quote]
Ah, the original question was worded funny, "Hey, how would i get a handle to the thread of another process?"

I assumed you wanted to get a handle to the process. What I think you wanted to ask was how to get a handle to a thread in another process.
[/quote]

Question was fine and worded properly, else he would have asked "How would i get a handle to another process". You made a mistake and you're justifying it by partly blaming for their wording so, no doesnt work like that unfortunately. Nice try though, better luck next time
October 25, 2007, 2:06 AM
warz
[quote author=devcode link=topic=17131.msg174197#msg174197 date=1193277994]Question was fine and worded properly, else he would have asked "How would i get a handle to another process". You made a mistake and you're justifying it by partly blaming for their wording so, no doesnt work like that unfortunately. Nice try though, better luck next time[/quote]

Uh, nope. Read brew's question, and then hopefully you'll understand iago's thoughts. You don't get a handle to the thread  of another process. The original question just doesn't make sense. You almost had him, though.
October 25, 2007, 5:00 AM
Quarantine
[quote author=devcode link=topic=17131.msg174197#msg174197 date=1193277994]
[quote author=iago link=topic=17131.msg174195#msg174195 date=1193276567]
[quote author=brew link=topic=17131.msg174179#msg174179 date=1193241091]
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
[/quote]
Ah, the original question was worded funny, "Hey, how would i get a handle to the thread of another process?"

I assumed you wanted to get a handle to the process. What I think you wanted to ask was how to get a handle to a thread in another process.
[/quote]

Question was fine and worded properly, else he would have asked "How would i get a handle to another process". You made a mistake and you're justifying it by partly blaming for their wording so, no doesnt work like that unfortunately. Nice try though, better luck next time
[/quote]

lolol. no
October 25, 2007, 10:28 AM
devcode
[quote author=Warrior link=topic=17131.msg174206#msg174206 date=1193308133]
[quote author=devcode link=topic=17131.msg174197#msg174197 date=1193277994]
[quote author=iago link=topic=17131.msg174195#msg174195 date=1193276567]
[quote author=brew link=topic=17131.msg174179#msg174179 date=1193241091]
[quote author=iago link=topic=17131.msg174178#msg174178 date=1193240069]
The functions you need are something like:
FindWindow() to get a handle to the window
GetWindowThreadProcessId() to get the process id (I am doing the names from memory, so I could be wrong on that)
OpenProcess() to get a handle to the process

Somebody can correct me if I'm mistaken.
[/quote]
IIRC, OpenProcess returns a handle to the process, not the thread. Perhaps you were thinking of OpenThread? (that requires a thread ID, and GetThreadID requires a thread handle, what i wanted in the first place) I've found a good way to do this-- calling CreateToolhelp32Snapshot with flags TH32CS_THREAD (I thought at first i was going to have to use a kernel mode api for this one) then call OpenThread. Thanks anyways.
[/quote]
Ah, the original question was worded funny, "Hey, how would i get a handle to the thread of another process?"

I assumed you wanted to get a handle to the process. What I think you wanted to ask was how to get a handle to a thread in another process.
[/quote]

Question was fine and worded properly, else he would have asked "How would i get a handle to another process". You made a mistake and you're justifying it by partly blaming for their wording so, no doesnt work like that unfortunately. Nice try though, better luck next time
[/quote]

lolol. no
[/quote]

lolol. hi

[quote author=betawarz link=topic=17131.msg174203#msg174203 date=1193288436]
[quote author=devcode link=topic=17131.msg174197#msg174197 date=1193277994]Question was fine and worded properly, else he would have asked "How would i get a handle to another process". You made a mistake and you're justifying it by partly blaming for their wording so, no doesnt work like that unfortunately. Nice try though, better luck next time[/quote]

Uh, nope. Read brew's question, and then hopefully you'll understand iago's thoughts. You don't get a handle to the thread  of another process. The original question just doesn't make sense. You almost had him, though.
[/quote]

I know you like iago and all but you can hop off cause he's still not going to give you Windows.Vista.Source.Code-2007-IAGo. Next.
October 25, 2007, 1:27 PM
warz
[quote author=devcode link=topic=17131.msg174207#msg174207 date=1193318861]I know you like iago and all but you can hop off cause he's still not going to give you Windows.Vista.Source.Code-2007-iago. Next.[/quote]

I C WHAT U DID THAR
October 25, 2007, 4:05 PM
devcode
[quote author=betawarz link=topic=17131.msg174210#msg174210 date=1193328301]
[quote author=devcode link=topic=17131.msg174207#msg174207 date=1193318861]I know you like iago and all but you can hop off cause he's still not going to give you Windows.Vista.Source.Code-2007-iago. Next.[/quote]

I C WHAT U DID THAR
[/quote]

OMG I JUST C WHAT I DID THAR
October 25, 2007, 6:55 PM
BreW
[quote author=betawarz link=topic=17131.msg174203#msg174203 date=1193288436]
[Uh, nope. Read brew's question, and then hopefully you'll understand iago's thoughts. You don't get a handle to the thread  of another process. The original question just doesn't make sense. You almost had him, though.
[/quote]

warz is right. I did word it wrong, I ment to say the thread[size=6]s[/size]' IDs of another process.
October 25, 2007, 7:21 PM

Search