![]() Ok, here is a super-stripped-down example of a program in VB6 to spawn and monitor programs. CreateProcess gives you the handle directly. The VB6 Shell() function returns a Process ID you can use to call OpenProcess with. You don't need to go spelunking for processes just to get a handle to child processes that you spawn. How To Enumerate Processes From VB 6 on Win 2003?.bat file but wait until its done running before moving on? Monitoring processes to see if they've crashed in vb6. ![]() Here are some related questions although you probably already saw them when you searched this site before posting: Another EnumProcesses/OpenProcess implementation.Getting Process Information using PSAPI.There was another question posted about this a while back with some example code.Īnother possible approach would be to use WMI ( some useful snippets to adapt).įinally, here are some tutorials that show you how to do it (I'd recommend trying it yourself first though :): There is also a fairly nice example on MSDN.Īnd of course, there is CreateProcess ( AllApi link) or ShellExecute ( AllApi) for spawning processes - the former gives you more control over the creation of the process, while the latter is a much simpler call. To start interrogating Windows about a particular process ( another VB6 example). I'd start with looking at EnumProcesses ( VB6 example and declaration here) which can be used to gather information about all running processes. ![]() There are numerous Windows API functions you can use to do this.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |