I am trying to get the name of a window, given the handle. I don't know much C, but I learned Perl before, so variables and basic concepts are not foreign to me. The pointers are a problem though. Can you tell we what is wrong with this code? i only get (null) as the output. im pretty sure this is lousy code too, how would u write it?
how would i get the hex representation of the pointer, like 0xFFFFCCCC?
is the handle supposed to be in decimal or hex? both give me (null)
printf("%s", (char *) Pointer);
the same as:
char * Pointer;
Pointer = &Buffer;
gets( szWindowHandle );
hWnd = (HWND) szWindowHandle;
GetWindowText(hWnd, Pointer, 25);
printf("Window name is %s\n ", Buffer);