When making a dll, how do i make one int variable accesable all the time. Instead of a different one for each app?
Add a segment to your code
Now when you link add a param like "/SECTION:syshook,rws"
syshook SEGMENT
hKeyHook DWORD ?
syshook ENDS
Now when you link add a param like "/SECTION:syshook,rws"
How would i do that in c?
>>How would i do that in c?
Depends on the compiler I'm afraid....
IE for Visual C++, you would;
Depends on the compiler I'm afraid....
IE for Visual C++, you would;
#pragma data_seg(".syshook") //Set shareable segment
HHOOK hKeyHook = NULL; //Handle to my hook
#pragma data_seg()
#pragma comment(linker, "/section:.syshook,rws")
Would you happen to know how to do it in mingw?
AFAIK declaring a section as sharable works in Win9x only and you have to declare all sections (.text, .data,...)as shareable. Im not quite sure, though.
I'm sorry I dont know how to do that in Mingw....
AFAIK declaring a section as sharable works in Win9x only and you have to declare all sections (.text, .data,...)as shareable. Im not quite sure, though.
No...it works AOK in Win 2K & XP
AFAIK declaring a section as sharable works in Win9x only and you have to declare all sections (.text, .data,...)as shareable. Im not quite sure, though.
No...it works AOK in Win 2K & XP
LOL....Sorry...britishness shines through
The way I feel today it very well could be "Asleep On Keyboard", but more likely;
AOK == All Is Okay
I think..... :alright:
The way I feel today it very well could be "Asleep On Keyboard", but more likely;
AOK == All Is Okay
I think..... :alright: