Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getobj for items in the taskmgr processes tab?
Message
From
16/03/2002 05:27:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/03/2002 12:52:54
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00633503
Message ID:
00633713
Views:
22
>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 #631410
In 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 #9907
But 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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform