This code works fine on XP, but not on WinMe.
When run thru Olldbg, I get no error messages.
Any ideas?
When run thru Olldbg, I get no error messages.
Any ideas?
AppName db "Terminate",0
nice_guy db "iexplore.exe",0
errSnapshot db "CreateToolhelp32Snapshot failed.",0
errProcFirst db "Process32First failed.",0
.data?
hSnapshot HANDLE ?
ProcEnt PROCESSENTRY32 <?>
.code
start:
invoke CreateToolhelp32Snapshot, TH32CS_SNAPPROCESS,0
.IF (eax != INVALID_HANDLE_VALUE)
mov hSnapshot,eax
mov ,SIZEOF ProcEnt
invoke Process32First, hSnapshot,ADDR ProcEnt
.IF (eax)
@@:
invoke lstrcmpi, ADDR nice_guy ,ADDR
.IF (eax == 0)
invoke OpenProcess, PROCESS_TERMINATE,FALSE,
.IF (eax)
invoke TerminateProcess, eax,0
.ELSE
;failed for some reason
.ENDIF
.ENDIF
invoke Process32Next, hSnapshot,ADDR ProcEnt
test eax,eax
jnz @B
.ELSE
invoke MessageBox, NULL,ADDR errProcFirst,ADDR AppName,MB_OK or MB_ICONERROR
.ENDIF
invoke CloseHandle, hSnapshot
.ELSE
invoke MessageBox, NULL,ADDR errSnapshot,ADDR AppName,MB_OK or MB_ICONERROR
.ENDIF
invoke ExitProcess, NULL
end start
skywalker,
Did it walk thru processes under Me? OpenProcess() can fail too.
Did it walk thru processes under Me? OpenProcess() can fail too.
I got Error_Sucess when I went just past OpenProcess.
http://www.microsoft.com/windows/support/endofsupport.mspx
Microsoft doesn't support WinME - I don't support WinME. Anyone still on 95/98/ME has some serious issues. (Of course this useless banter is my personal opinion.)
Microsoft doesn't support WinME - I don't support WinME. Anyone still on 95/98/ME has some serious issues. (Of course this useless banter is my personal opinion.)
http://www.microsoft.com/windows/support/endofsupport.mspx
Microsoft doesn't support WinME - I don't support WinME. Anyone still on 95/98/ME has some serious issues. (Of course this useless banter is my personal opinion.)
Your opinion is noted.
But have you thought it through.
Not everyone can upgrade.
Have a great day.
skywalker,
Are those terminated processes still functioning, or they're just hanging in memory? If latter is true, this possibly is related to handle of process not being closed. Also, your process is included in snapshot too, if it is too early in the list, y'know…
Are those terminated processes still functioning, or they're just hanging in memory? If latter is true, this possibly is related to handle of process not being closed. Also, your process is included in snapshot too, if it is too early in the list, y'know…
Yes, the "should have been terminated process" is still running.
I will step thru it and see what I can find.
I will step thru it and see what I can find.
skywalker,
I've meant, your program isn't "iexplore.exe"? Guess what will happen if Process32First() / Process32Next() enumerate it as not the last in the snapshot…
I've meant, your program isn't "iexplore.exe"? Guess what will happen if Process32First() / Process32Next() enumerate it as not the last in the snapshot…
skywalker,
I've meant, your program isn't "iexplore.exe"? Guess what will happen if Process32First() / Process32Next() enumerate it as not the last in the snapshot…
No, my program is called killit.
I am at a dead-end right now.
WinMe has more than a few wierd things that I haven't figured out yet. :-)
Your opinion is noted.
But have you thought it through.
Not everyone can upgrade.
According to statistics for example: http://www.w3counter.com/globalstats.php?year=2010&month=4 Windows ME doesn't even have close to 0.10%. Your intent is very noble but a waste of precious programming time.
I am waiting on a copy of XP-Pro I got for $34.
So, WinMe is now a dead issue.
So, WinMe is now a dead issue.
Good. Welcome to the future :)
Good. Welcome to the future :)
Good. Welcome to the future near-past :P
I used to use WinME, still have it too on a VM. Didn't have as many issues as others did with it, but moving away from the 9x architecture is nothing but a good move.