Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Global Keyboard Hook on Startup

Posted on 1997-09-13
6
202 Views
Last Modified: 2013-12-29
My Win '95 application has a DLL that contains a global keyboard hook
that monitors all keyboard events.  I have come across a strange problem
and cannot figure out what is exactly happening.

When I manually run the application it runs fine and the DLL picks up
the key strokes and status with no problem.

However,  if the application is run automatacly from the Statup
directory,  and I open "My Connection" to connect to the internet the
keyboard status gets confused.

I check the ALT, CTRL and SHIFT keys with "GetKeyState(VK_CONTROL)",
and after  "My Connection" is started the GetKeyState() returns false
values.  But if I shut the application and restart it it works fine.

If anybody has any idea I would appreceate any help that you can give
me.


Thanks
Yaakov Blank
iti@netvision.net.il

0
Comment
Question by:yeb
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:j2
ID: 1696583
When launching from teh startupo group, the program gets launched before the system has loaded all other modules.. Probably things get loaded in teh "wrong" order..

Add a delay at the start of your program and saee if that  helps.
0
 

Author Comment

by:yeb
ID: 1696584
That seems like an obvious cause but even with a 10 second Timer
delay before loading the DLL doesn't help.  I need to know more details if there is anyway to get a reliable Keyboard state and why it currently doesn't work
0
 
LVL 14

Accepted Solution

by:
smeebud earned 50 total points
ID: 1696585
yeb,
I believe you have posted in the wrong section. We have a programming section that can answer your question.
My answer would be, Don't have it in the Start Up group, or try loading it from win.ini from a RUN= OR A LOAD=
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 

Author Comment

by:yeb
ID: 1696586
Smeebud,

I put it in a run= in win.ini.  Do you have any idea why it was happening?

Also could you have multiple run= statements in the win.ini?

Thanks again





0
 
LVL 14

Expert Comment

by:smeebud
ID: 1696587
Did that fix it.
Yes tou can have multible run= statements
0
 

Author Comment

by:yeb
ID: 1696588
Thanks again and it fixed it !!!

0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows command prompt command to set default sound 4 40
Problem to file 5 29
User wants to log with Username or Email 4 47
tamper proof asset tags - benefits 4 19
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question