Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Getting the name of program/thread that called keyboard hook.

Posted on 2000-04-26
5
Medium Priority
?
165 Views
Last Modified: 2010-04-04
How do I go about finding out which program called my keyboard hook procedure?  What if there are no applications running, how does the OS (W98) identify itself?
0
Comment
Question by:Traal
[X]
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
  • 2
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 40 total points
ID: 2754245
The hook DLL is docked to the program. The DLL is now part of this program. Use the standard Win32 function to get the exe name in the DLL. That works for me and a shell hook. There is always a program running. at least the system itself. Sometimes you will get a DLL name especially for an explorer window.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 2754286
Call GetModuleFileName(GetModuleHandle(0), ...).

Regards, Madshi.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 2754638
GetModuleFileName(GetWindowLong(HWND(wPar),GWL_HINSTANCE),buf,256);

All hooks hand in a window handle.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 2754646
I prefer my suggestion, simply because you don't need a window handle for it. In keyboard hook dlls you often don't have a window handle.
0
 
LVL 2

Expert Comment

by:hhamster
ID: 2756895
following
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

604 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