Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ProcessID different on Win2K / Win XP

Status
Not open for further replies.

bbuk

Technical User
Apr 27, 2002
44
0
0
GB
Hi All

I used the excellent code provided by Hypetia in thread222-837273 as part of an app which stops a running application and its support apps and switches folders then restarts it. All was well for sometime until forces outside my control changed one of the apps. No problem, I updated my code to suit but then I started getting bug reports. After much debugging I have found that the line

Code:
ProcessFirst hSnapShot, pe32

populates pe32.szExeFile with the value "RemoteControlEx.exe" as expected under WInXP but with the value "RemoteControlEx" under Win2k resulting in a processID of 0 (because it is not matched).

I have worked around by checking for both values and using the non-zero PID but can anyone explain why this happens?

Thanks in advance

Andy
 
Any suggestions gratefully received!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top