Click here to Skip to main content
15,913,685 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralRe: Windows 2000 Pin
27-Jun-01 10:18
suss27-Jun-01 10:18 
GeneralRe: Windows 2000 Pin
28-Jun-01 3:12
suss28-Jun-01 3:12 
GeneralRe: Windows 2000 Pin
29-Jun-01 7:50
suss29-Jun-01 7:50 
GeneralNative Api , ZwquerySemaphore Pin
nicolas bertrand25-Jun-01 3:42
nicolas bertrand25-Jun-01 3:42 
GeneralWindows bsed RTOS simulator Pin
24-Jun-01 19:20
suss24-Jun-01 19:20 
QuestionHow do I get an application's .exe name using visual C++ Pin
Jennifer Pinkton24-Jun-01 17:22
Jennifer Pinkton24-Jun-01 17:22 
AnswerRe: How do I get an application's .exe name using visual C++ Pin
Paolo Messina28-Jun-01 7:26
professionalPaolo Messina28-Jun-01 7:26 
AnswerRe: How do I get an application's .exe name using visual C++ Pin
reiko30-Jul-01 16:50
reiko30-Jul-01 16:50 
If you want to track application's exe name based on current focus, I recommend you write small DLL to hook some events. You may need to hook couple of them like WH_CBT and WH_SHELL using SetWindowsHookEx(). From my experience, you need serious testing to make sure your DLL is really tracing focus movement. There are many ways to move focus to another application and covering all of them may need long time work.

Once you have that DLL that will attach itself to exe by hooking function, then the filename of that exe can be obtained by GetModuleFileName(). Even if GetModuleFileName() won't work right for some application, you can use very powerfull ToolHelp32 functions to;

1 enumelate all processes
2 find process ID that matches what GetCurrentProcessId() returns

Just for your info, if you unfamilier with DLL which attaches itself to exe by SetWindowsHookEx(), then take a look at Matt Pietrek's article MSJ No 12 Vol 6 (MouseWheel.DLL).


Have fun!
reiko

QuestionHow to display IWebBrowser2 in SDI view Pin
22-Jun-01 14:07
suss22-Jun-01 14:07 
AnswerRe: How to display IWebBrowser2 in SDI view Pin
Michael Dunn22-Jun-01 17:05
sitebuilderMichael Dunn22-Jun-01 17:05 
GeneralCredit Cards Pin
Dan Holloway21-Jun-01 23:08
Dan Holloway21-Jun-01 23:08 
GeneralIWebBrowser2 Pin
Masud Alipour21-Jun-01 6:36
Masud Alipour21-Jun-01 6:36 
GeneralRe: IWebBrowser2 Pin
21-Jun-01 12:24
suss21-Jun-01 12:24 
GeneralMulticast File Transfer Pin
20-Jun-01 1:25
suss20-Jun-01 1:25 
QuestionHow was my program started? Pin
Steve Thresher18-Jun-01 1:45
Steve Thresher18-Jun-01 1:45 
GeneralC++ Pin
18-Jun-01 0:32
suss18-Jun-01 0:32 
GeneralRe: C++ Pin
markkuk18-Jun-01 0:55
markkuk18-Jun-01 0:55 
GeneralPlease help on queue permentation problem Pin
Snail17-Jun-01 19:12
Snail17-Jun-01 19:12 
GeneralPopup feature like the MSN messager notification popup. Pin
Heath Dillon17-Jun-01 17:36
Heath Dillon17-Jun-01 17:36 
Generaldrawing splitter bar Pin
Amit Dey15-Jun-01 9:08
Amit Dey15-Jun-01 9:08 
GeneralRe: drawing splitter bar Pin
Michael Dunn16-Jun-01 6:50
sitebuilderMichael Dunn16-Jun-01 6:50 
GeneralHeight and font of HeaderCtrl Pin
14-Jun-01 12:53
suss14-Jun-01 12:53 
GeneralRe: Height and font of HeaderCtrl Pin
Steve Thresher18-Jun-01 1:28
Steve Thresher18-Jun-01 1:28 
GeneralDYNAMIC List and datagrid Pin
Nasser AL-Sodais13-Jun-01 18:49
Nasser AL-Sodais13-Jun-01 18:49 
GeneralCCheckListBox for WinCE Pin
David Flores13-Jun-01 9:31
David Flores13-Jun-01 9:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.