Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Somebody can helpme with a api call??
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00165704
Message ID:
00165729
Views:
17
>>>Hi Miguel,
>>>
>>>ShellExecute doesn't return the value that GetExitCodeProcess needs. It returns the instance handle, not the process handle, which is what's required. If you were to start the process with CreateThread() I think (but am not 100% sure) that you'll get the value you need.
>>>
>>>If you're just trying to shut down another application, look at my FAQ on the subject. It show's how to close another windows program.
>>>
>>>hth,
>>
>>I want to log the activities of a user.
>>then i will have a form to "autostart" form a folder, a program: ej: autocad clicking in a dwg file.
>>for that I think i must use the ShellExecute api call.
>>then I mus log when it close autocad, then I think I use GetExitCodeProcess.
>>
>>Am I lost???
>>:(
>>
>>wher are you FAQ??
>>(My Icq number is 3813422 if u have ICQ.)
>>thanks.
>
>Hi Miguel,
>
>No I don't have an ICQ. The FAQ is in the UT Knowledge Base (purple boox), under "Frequently Asked Questions". Win32 and other APIs section. It's titled "How do I close another application?" From what I understand, it may not be exactly what you're looking for. You're right about using ShellExecute() to start the program. Are you trying to find out when they exit?




Exactly!!
the problem is that I can not have the process handle.
i try to loop all the active windows, and then, with
GetWindowLong(nCurrwnd, GWL_HINSTANCE)
try to have all the handles, but noone is the same that i have with shellexecuteexe.

maybe I can do it with ShellExecuteExeEx, I can do it, but I need to define a structure, and no idea how to do it.
------------------------------------
Miguel Angel Hernaiz
miguel@gnomo.net --- miguel@vfug.org
ICQ: 3813422 --- www.gnomo.net
------------------------------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform