|
Hi,
I'm having a problem getting my hooks to work. I can successfully hook Keyboard and System messages (WH_KEYBOARD and WH_SYSMSGFILTER) but can't seem to be able to prevent Ctrl+Alt+Delete or MSGF_NEXTWINDOW from doing what they normally do.
I'm trying to prevent users of my app from accessing windows (definately not what i'd want, i know, but clients are clients), and i've got a feeling that part of the problem is the differences between 95/98 and 2k/XP? any ideas?
Thanks in advance to anyone who can help,
Alex
|
|
|
|
|
You'll never be able to hook that keystroke using a system wide hook or any other technique...
In order to do that you must create a GINA.DLL that handles that keystroke as you want...
Hope this helps...
|
|
|
|
|
Joan Murt wrote:
You'll never be able to hook that keystroke using a system wide hook or any other technique...
In order to do that you must create a GINA.DLL that handles that keystroke as you want...
I've been told this before - do you mean MSGINA.DLL? My version of Win98 doesn't have this dll present, but apparently WinNT does. does this matter?
Have you got any idea where I can look to find out a few clues on how to do this?
Cheers for the response,
Alex
|
|
|
|
|
hi
It is possible to hook Ctrl+Alt+Del combination by replacing the definition to Msgina.DLL in the registry by your own dll that is handling all the keyboard messages and forwarding all allowed key combinations to the original msgina.dll.
The easiest way to prevent unauthorized process kills is to use the VC++ resource editor, open msgina.dll and by making all buttons in the task manager dialog box disabled except Cancel. This is not a very beautiful method, but it works...
i saw an article on CP last days..search for it..it was on hooking ctrl + alt + del.. type something..
hope this works..
Himanshu
|
|
|
|
|
If I were to go a step further and prevent the Task Manager from even being shown, would I be able to write my own GINA.DLL (instead of changing microsoft's and just disabling buttons), and if so how easy is this to do and where would I start to look to do it?
Thanks for the reply!
-Alex
|
|
|
|
|
Win95 + 98 don't have a MSGINA.DLL. Hooking can be done by setting the screensaver state programatically. The call
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, lpvoid, 0)
blocks the keys, and
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, FALSE, lpvoid, 0)
re-enables them.
For replacing MSGINA.DLL you should search the MSDN. There're some good examples and explanations.
|
|
|
|
|
Thanks for that. I'd figured out the screensaver bits but was unsure if that was the accepted way of doing it.
Basically it sounds like such a muck-about to do all this that i'm probably going to try and get my boss to persuade the clients that they don't realy want this feature after all. If there were one way for all versions of Windows, then perhaps it would work, but I would also need to disable the Windows Key, Alt+Tab, Alt+Esc and Ctrl+Tab to actually prevent anyone using the app from accessing the desktop. All in all I'd never implement something like this through choice
Thanks for the support though!
-Alex
|
|
|
|
|
I want to change the back ground color of whole of my application developed in VC++... Suppose I want to change the background to Green...
Every thing in green.... Toolbar, menu , status bar, title bar etc ....
any help? or comments
|
|
|
|
|
How I can change the property sheet background color... Also the property Tab and button like OK, Cancel and Apply should be changed...
Also How the title bar background color changed..
Thanks In advance
|
|
|
|
|
Hi,
I was seraching the codeproject site and came across your post. I am sorry that no one has seemed to reply to your post. I was wondering if you managed to change the look of any of your property sheet buttons? I am trying to do the same...I want to simply change the color of the OK and other buttons.
Thank you for any help you are able to give.
Michael
mikethomas@veryfast.biz
|
|
|
|
|
Hello everyone!
I've been searching for a tutorial about creating ActiveX controles on a website (no asp.. just html & javascript)
One of my friends said that i should use "COM", but i haven't found anything that worked.. I've seen one here with cookies in ASP, but when i'm not using ASP, it's kinda hard..
maybe someone has a small source for an ActiceX control that returns a string.. like
This is a test: (call function from ActiveX control)-> "Test string returned from an ActiveX control"
I hope someone can help me or direct me to a good tutorial..
Ice
|
|
|
|
|
|
I tried to open a PE file with a program called PEExplorer .. Opend the header & discoverd that all the items in the header is correct..
but i found something strange i igot "the address of entry point" field from the header but when i checked that address i found it's so different from the contents that the PEExplorer program shows...
i found that the "image base" field is added some times 2 the address of the entry point field...
for example the address of entry point is: 0000E67Ch
& the image base is: 01000000h
but when i run the disassembler view of the PEExplorer i find that the address of the entry point is 0100E67Ch & this address can't be located coz the file size is smaller than it & the contents that the disassembler show in this location 0100E67Ch i can find it in another different place in my file
plz does any one knows how is this operation handled & how can i reach 2 the real entry point of an exe file...
my email is
blacksun_damn@yahoo.com,
ashshab_beh@yahoo.com
thanx alot ppl
blacksun
|
|
|
|
|
The base is the recommeded address that the module should load at in memory at runtime.
The entry point of the module cannot be 0000E67Ch when it is loaded, because anything under the 4MB is reserved for the system. That is why the base address is added to the entry point, or the system will pick a new base address offset if that one is already taken.
The point is still, that the entry point of your function will be 0000E67Ch Bytes from the beginning of the base offset address.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
How do I get the MAC address of a host that's not in the ARP-cache?
I'm using GetIpNetTable() to search the ARP-cache.
It works okay as long as the entry hasn't timed out yet.
I looked through <iphlpapi.h> and saw SendARP(). Unfortunately my MSDN collection is too old to document this function . Could it be used for an ARP-resolution?
I need this to port libnet to Win-XP (first with MingW then MSVC).
Ref. http://www.packetfactory.net/libnet.
Thanks.
Gisle V.
"If you feel paranoid it doesn't mean they're not after you!" -- Woody Allen
|
|
|
|
|
I hate to reply to my own posts, but for anyone interested..
I found some more details on SendARP() and why it's
not very usable.
- Not supported on Win9x/ME/NT.
- Doesn't add the result to the global ARP-cache.
- Doesn't retransmit on timeout.
So I probably end up writing my on ARP resolver.
Gisle V.
"If you feel paranoid it doesn't mean they're not after you!" -- Woody Allen
|
|
|
|
|
Hi
I have a custom window control derived from CTreeCtrl.I want to convert that into ActiveX component.
So any idea how to proceed.
I have used Wizard to create activex contol but there is no provision to include our custom control ......So any help is appreciated
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Export your class as Gallery, then make new ActiveX project and import your gallery!
A. Riazi
|
|
|
|
|
Hi riazi,
Thanxs for the help ....
Can u be more elaborate in the explaination...
I converted my control to .ogx file......
Then what should i do....
I created the MFC activex project and then i went to Add to project/Insert activex component.....
Is it correct...Do have any materials to refer.....
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
No, dont use Add to project/Insert activex, instead use Add to project/Components and Controls/<your previous="" project="" name="">/<gallery name="">
A. Riazi
|
|
|
|
|
Any idea how to map all the functions of the Custom Contol so that it can be given outside.....
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
For every member function, add a method. and for every public member variable add a property (Get/Set functions).
A. Riazi
|
|
|
|
|
I work for a small programming house, that has just doubled in size( now FOUR Programmers!!! ), we now need to implement some sort of source control and bug tracking programs. I have had a quick look at cvs for source control, but i haven't been able to find and decent bug traking programs. I'm just wondering what other people out there are using, and if any one has had major issues implementing or using cvs, or is there is something else that is a bit better.
"!!Insert witty signature here!!"
|
|
|
|
|
Do you have SourceSafe?
A. Riazi
|
|
|
|
|