Wow I got a good portion of dumbness :D
Thanks, this is the big mistakes, I totally didn't think about it.
Well, day ended, I've learned couple of things. Thanks guys!
Type: Posts; User: Hawkin
Wow I got a good portion of dumbness :D
Thanks, this is the big mistakes, I totally didn't think about it.
Well, day ended, I've learned couple of things. Thanks guys!
Oooh in the beginning I tried to convince myself that it's logical for it to be *array[i] and tried it. The result was a crashing program. I would have never found out that it must be (*array)[i] :(...
int foo(int** array)
{
int i;
for(i = 0; i < 8; i++)
{
int *temp = malloc(0);
temp = (int*) realloc(*array, (i+1)*sizeof(int));
if(temp != NULL) *array = temp;
laserlight: And exactly there is my problem in understanding.
int *a = malloc(0);
int foo(int** array)
{
int *temp = malloc(0);
temp = (int*) realloc(array, somenumber*sizeof(int));
I have another issue...
int *a = malloc(0);
int foo(int* array)
{
int *temp = malloc(0);
temp = (int*) realloc(array, somenumber*sizeof(int));
Thanks for the answer.
I just found in some of my old code that I had already solved this problem.
As you said, I may only do it with a new pointer.
I also saw that I had to live with the...
Hi fellows!
I am dealing with raw data and want to interpret data within an array differently.
unsigned char data[] = "\x99\xA2\x1E\x00\x6B\x00\xE4\x03\x00\x00\x00..."
printf("%hu\n",...
Hmm, we talk not in the same direction I guess. The point here is not how to code the minimizing of active windows, but how to execute it. Your idea is exactly my approach, but how would you run the...
Okay... where to start...
First of all to all your Aero and "dirty fix" suggestions: In my previous post I have told that I am running XP, so I don't benefit from those tricks.
Second I only...
It's not what I wanted. I want to proxy one single dll of one single already active program. This is only one dll in one folder, which will be loaded only once ;) My solution is a global hotkey for...
CommonTater: I am using proxy dlls for some executables for months, which work absolutely perfect (on XP that is). It was the last part of hooking that I needed to learn, because this solves many...
Hey there!
I thought about programming helpful macros for windows, well actually I only had one idea till now, that is writing a function that minimizes all windows and shows the desktop. It's...
Because the code is old and long where I do many other things. Working with data as well as working with ascii chars and I don't want to check all the working code again ;)
That's exactly what...
I want to avoid memcmp because the locations I want to check are random and not in a row. (Sometimes I want to check byte 1,2,3,4 but most often I want to check 1,2,9,10,23,24,25,26 which would mean...
Okay I see that the warnings occur before comparing a signed char with 0xaf and 0xb0.
I always thought, when I write 0xFF or \xFF, it doesn't matter if a number is treated as signed or unsigned...
I have read this internet page before posting.
And yes, the compiler writes this error for line 140 and 146. It's these two lines that I highlighted.
I wonder so much because I use the same...
Hi there!
Really, really strange, I have no clue why I get two warnings. Look at the code yourself, I splitted the lines to see where exactly the compiler (gcc) shouts:
int func(char *buf)...
I just realized my own how dumb I was :D
Thanks for your answer, of course I can just use an array, oh my god!
Yes, as I wrote, it is just byte decryption.
Hi all!
I am doing some packet decryption where the encryption method is unknown, so I just have the raw data.
I thought that receiving and decrypting large files on the fly is rather...
char *tmp = malloc(newlength!=0?newlength:1);
About realloc I know, but thanks. I am too lazy to implement any security in raw code. That will be the task when my snippet works and I will put it...
rand()%21 - 10
Hi guys!
I have a problem with memcpy. I have a memory location with 3 strings, all 0 terminated and want to shorten it to 2 strings.
Example:
Tree\0House\0Banana\0
becomes
House\0Banana\0
Thank you for the input. I (finally) added both methods to my program to find them if I need them in another program also. Yet I don't know why sizeof(pitems)/sizeof(pitems[0]) wouldn't work if I...
Sorry for intruding to your thread. I would like to know what you all suggest to use for just sending POST requests and receiving server answers. Using Windows, DevC++, C.
I want it to be a simple...
Hey there!
I have an array of strings where I declare all strings like this:
string[2] = "\xFB\x9D";
to represent 2 chars in one variable. All tend to be only 2 bytes long.
char a[2] =...