FULLY COMMENTED TUTORIAL ON PROCESS DETECTION USING THE PROCESSFIRST, PROCESSNEXT, AND CREATETOOLHELP API'S.
Ok here is the deal, I spent alot of time trying to figure out how to find a process, parse out the exe file name and it's process id to use for process memory manipulation. However, there were no eazy to read tutorials that could make me understand how the api's worked. After figuring everything out, I thought I should make a fully commented source for others who may end up stuck in my shoes. I hope you enjoy. The sub is the easier to understand than all on VBC thus far.
Inputs
input the case sensitive exe file name.
Assumes
It is extreemely commented, to the point where someone who don't know vb at all could prolly understand it. To view the Processentry32 type declaration and related api's refer to the module.
Returns
determines if the process is running and if so it will msgbox the processes parsed szexefile name and it's process id number.
Side Effects
I have not tried this code on any other environment than vb6.
API Declarationsprocessfirst
processnext
createtoolhelpsnapshot
type processentry32