Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-05-2006, 00:20
MarkusO
 
Posts: n/a
CreateProcess giving wrong ProcessID/ThreadID

I currently have the following problem:

I'm coding an application which shows the user a HTML "readme" and does not continue until the user closes the window again. To do this, I get the default browser, execute it by "CreateProcess" with the HTML file as parameter and wait for the process to exit.

While this works fine when "Internet Explorer" is the default browser, it doesn't work with "Firefox" in some situations.

If a copy of IE is already running, a call to CreateProcess will create a second process and return the correct ProcessHandle and ProcessID in the PROCESS_INFORMATION structure passed to CreateProcess.

However if there is already one open Firefox window, the new window will get opened from the already running process and CreateProcess will fill the PROCESS_INFORMATION structure with some values, but as far as I can tell, the process they should belong to never existed.

Now I don't know how to check when the users closes the window my application opened, since the ProcessHandle and ProcessID returned from CreateProcess are worthless. I don't want to use any "FindWindow" calls, since it would practically lock myself to Firefox, since Internet Explorer works fine with the method explained below.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SDK 11.14 Demo setup giving trouble :( Gede General Discussion 6 03-17-2024 10:44
Armadillo 3.50a giving trouble Flagmax General Discussion 6 01-05-2005 00:15


All times are GMT +8. The time now is 00:11.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )