Damn, I'm so hot when it comes to rollin noobs like blunts
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: FrostWraith on October 28, 2007, 11:21 AMQuote from: devcode on October 28, 2007, 11:08 AMNot that I plan to use this on any unix variants, I strive for as much portability as possible.Quote from: l2k-Shadow on October 28, 2007, 10:46 AM
try
fread(&id3v1, sizeof(char), sizeof(id3v1), fh);
His api call to fread is correct, so that's obviously not the problem (1 element of size id3v1). The only problem in his case is he needs to use strncmp( id3v1.header, "TAG", 3 ); although personally, I would use microsoft's stringsafe functions cause they're cooler.
Quote from: l2k-Shadow on October 28, 2007, 10:46 AM
try
fread(&id3v1, sizeof(char), sizeof(id3v1), fh);
Quote from: brew on October 27, 2007, 06:29 PM
Just wondering, why wasn't ebx listed with win32's list of volatile registers? must it be preserved or something? I've been modifying ebx just like eax or ecx and i've had no errors.
Quote from: betawarz on October 25, 2007, 11:05 AMQuote from: devcode on October 25, 2007, 08:27 AMI 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.
I C WHAT U DID THAR
Quote from: Warrior on October 25, 2007, 05:28 AMQuote from: devcode on October 24, 2007, 09:06 PMQuote from: iago on October 24, 2007, 08:42 PMQuote from: brew on October 24, 2007, 10:51 AMAh, the original question was worded funny, "Hey, how would i get a handle to the thread of another process?"Quote from: iago on October 24, 2007, 10:34 AMIIRC, 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.
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.
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.
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
lolol. no
Quote from: betawarz on October 25, 2007, 12:00 AMQuote from: devcode on October 24, 2007, 09:06 PMQuestion 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
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 from: iago on October 24, 2007, 08:42 PMQuote from: brew on October 24, 2007, 10:51 AMAh, the original question was worded funny, "Hey, how would i get a handle to the thread of another process?"Quote from: iago on October 24, 2007, 10:34 AMIIRC, 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.
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.
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 from: MyndFyre[vL] on October 24, 2007, 11:19 AM
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 from: brew on October 24, 2007, 10:51 AMQuote from: iago on October 24, 2007, 10:34 AMIIRC, 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.
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 from: brew on October 23, 2007, 03:51 PMwww.g00gles.comQuote from: iago on October 23, 2007, 03:07 PMI always use \n instead of \r\n
Plus, people might make silly mistakes like using "\n" instead of "\r\n"
Hey, how would i get a handle to the thread of another process?
Quote from: brew on October 23, 2007, 09:59 AMQuote from: iago on October 23, 2007, 08:52 AMYou 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.
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 from: rabbit on October 23, 2007, 07:03 AMUse CSuperBrewProcessListerTabs, shits fyre
It ain't dynamic. Get over it.
Quote from: squiggly on October 22, 2007, 05:29 PMQuote from: Joex86] link=topic=3771.msg174098#msg174098 date=1193091669]
Or, they could settle for friends. With or without benefits.
Those who haven't been romantically involved rly should not comment
I mean rly
Blind leading the blind
Quote from: Grok on October 22, 2007, 10:12 AM
I am setting out to write a class library for use in a later project, and have not written any real OO code since Turbo Pascal 5.5 days. I use VB.NET in mostly RAD-style development for Windows Forms and Windows Services, but it's mostly procedural within events. (ala VB6 round peg in a VS2003 square hole)
I am looking to create a class hierarchy that is not inherited, because they don't share similar base class features. Rather, it's an organizational hierarchy. I suspect I need to implement generic collections of a type within each class to establish the hierarchy. But you tell me. Here's an example, using post office boxes.
A class library named PostalSystem
A collection of Nations
Each Nation contains Cities
Each City contains PostOffices
Each PostOffice contains POBoxes
Pretty simple, so I'm looking for the design pattern in VB.NET that one would use to establish this. All would need to be serialized to MSSQL or XML, but that's a later problem.
Anyone have any design pattern books or themselves know how this is properly implemented?
Page created in 0.169 seconds with 16 queries.