Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Processes opened with ShellExecute()
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00174034
Message ID:
00174329
Views:
30
>>>>Oops. Sorry George. Looked too fast. I was setting the value of the variable holding the calling handle to 0 as you had asked. Perhaps I should send the Desktop handle?
>>>>
>>>Hi again Bill,
>>>
>>>It's worth a try. Apparently (and this is a guess) the process is owned by the caller. Perhaps David F. or Christof can shed more light on this than I.
>>
>>Thanks for the info. I tried passing the Desktop handle and it's still hosing on me. It would seem to have something to do with sub-processes of processes or something like that. Sort of yanking the rug out from under one of the processes. But my knowledge of this stuff minimal so I'm doing a good bit groping. I wonder if using CreateProcess() would matter. I've never used it.
>>
>Hi Bill,
>
>Why not RUN /N...? If that doesn't work, You might want to look at the file (or was it an FAQ) Ed Rauh posted for launching processes.

It's both now - I put up a VCX this week, after lots of people sent email saying they had problems pulling the code off the FAQ message. As long as you're using the executable, and not trying to launch a document directly, there should be no problems using API_APPRUN.

Maybe it's time to add ShellExecuteEx() to the class as an option, or let people find the .EXE associated with a given file and let them use that to launch their application? I'm inclined to use ShellExecuteEx() to give access to actions other than 'OPEN' from the class launcher, and it'll be a good time to play around with the heap allocation and deallocation stuff using lstrcpy() and RtlMoveMemory() to populate the SHELLEXECUTEINFO structure (you need the Process Handle to make the rest of the class work as I want it to, so you have to not only allocate the structure, but extract a couple of members that come back in it.)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform