I was always wondering how do all the file compressors work?
I have always thought of writing one. Thanks.
Type: Posts; User: eXeCuTeR
I was always wondering how do all the file compressors work?
I have always thought of writing one. Thanks.
Well hooking is probably the issue. BTW, you cannot actually override the Window Procedure of another process, but you could set a hook with SetWindowsHookEx()
EDIT: Wrong thread.
using the pthread_mutex_lock() and pthread_mutex_unlock() is just like a lock block.
e.g:
C: (pthread.h)
pthread_mutex_lock();
// some code
pthread_mutex_unlock();
C#: (System.Threading)
What you are seeking is the pthread_mutex_lock function in C (or a lock { } block in C#), so only one thread can execute a particular piece of code at a time.
1. Yeah, I should erase that - that was used for bugs detecting, and I forgot to remove it.
2. I will make a condition if it fails.
3. How come will the pipes be leaked? Although I haven't thought...
Well what I actually tried to do in Read() is to read all the data in one single chunk.
For example, is the buffer_size is 10 bytes long, and the data in the pipe is more than 10 bytes (let's assume...
Hey, thanks for the comments!
About the sizeof....I didn't notice I used sizeof instead of strlen, that was totally dumb of me (guessing I was too tired or whatever)
---
I need to use realloc in...
I've written this today, very easy to use:
http://pastebin.com/m1c430b6a
/* PIPES HANDLING CLASS
* written by eXeCuTeR, 19.8.08
* Works only on GNU/Linux or any UNIX system.
*...
I'm not sure if will can work with textboxes but anyways, you can also use pipes.
Working with DevC++ is a nightmare, hehe.
I usually program on Linux with Geany, which is SO MUCH better.
Thanks for the comment.
About the loops...how can you actually tell whether you can use, int i; for(i = 0;...) or for(int i = 0;..)?
Yeah, I know, the indentation is messed up here but it...
If you just wanna export functions from other files, just create a DLL and include it in your code with LoadLibrary.
Then, get the function's address by using GetProcAddress.
Something like this.....
Anyone?
Again, there's no compilation errors it just doesn't work well:
if(FD_ISSET(i, this->readyList)) seem not to be working, although this statement is totally fine (and the select() function...
Hey guys,
I divided my chat server into a class and added a thread which is created when a user is trying to enter so he could enter the nickname and the "queue" (the loop) will be interrupted or...
What I'm trying to do IS NOT for a virus purpose, I guarantee - as I've told you, a friend gave me 2 programs: one that creates a process of the other one, and the other one who OpenClipboard(),...
I mentioned that he used these names for the names of the program.
And yeah, I'm trying to make that no other application will be able to write to the clipboard.
A friend gave me 2 programs he created:
One program (msnmsgr.exe, the first one) uses CreateProcess to the other one which is (svchost.exe, another program he created) and this program open the...
Does anybody know a way to do such thing? I assume there's some API functions.
Thanks!
Oh, I'm sorry, you're right, I'll edit.
And again, I assure you these 3 asterisks relate to the __vptr.
Well it seems like it, but you can't be sure because you don't know if someClass is an instance of another class (which is the derived/base class) and it might that the () operator was overloaded or...
I've come across this riddle:
What will this code do -
(***someClass)();
What will these 3 asterisks do?
This relates to the virtual table and the __vptr.
(someClass is AN INSTANCE OF an...
Yep, thanks, I've got the idea that only the OS itself can only access this part of the memory.
Well, this is an option:
(there's no checking whether index is bigger than the number of elements of the linked list, you can make one easily though)
typedef struct
{
int data;
struct node...
Of course it's the same principal but how does it access the heap?
---
Hehe, yeah cpjust, that's certainly an option.