>Thanks for your post:
>
>I tried getobj("outlook.application") and get an ole error moniker can not open file and outlook is open.
>
>but that is really a minor issue, the major app is awrem32.exe, which is from pcanywhere
>
>I downloaded the tlist, but what do I do with it?
>
>do I have to find a c compiler?
>
>is there a way to do it with fox api calls? and is there a place to get a list of names, ie outlook is outlook.application, but what is it for pcanywhere remote?
>
>thanks
Kevin,
Again you missed the comma in getobj(). It would be GetObj(
,"Outlook.Application").
Actually you don't need a C compiler. That code uses the winAPI calls already. They could be easily translated to be used in VFP. For getting tasklist and their PID (processID) you can check Message #
631410In that message Fabiano demonstrates an easy way of getting tasklist. In the lcBuffer he gets besides exe file's name there are also ProcessID, ParentProcessID, ModuleID etc.
Also there is a process killer API code in download - file #
9907But the real problem is not how you could get the handle or obj.ref. Once you get it you should close it or not. I suspect the leftovers are a result of VFP automation. If that's so instead prevent it from happening in the first place. If process is still in use and you kill the process more problems might arise.
Cetin