Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 8: Got questions? Got answers.
Message
From
20/10/2002 07:41:46
 
 
To
13/10/2002 22:21:25
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00707667
Message ID:
00713285
Views:
21
>Hey Ed,
>
>I know you can answer this question:
>
>I'm finally puting a project into production - making a few test installs on Win2k and Win98 boxes. When I exit the exe on the Win2k box and look at the Task Manager, the program unloads and disappears from the Applications tab. However, the exe remains in the Processes tab about 50% of the time and under circumstances which are not consistent with anything I can find.
>
>There are no dangling references (got code to chack for that), no open connections to SQL Server, no nada.

Jeff, the most common cause I've founf for this is to release a form where another, still existing form, holds an object reference, so the form never quite de-instantiates (RELEASE never properly terminates) - the only fix I've found that cleans this up is to issue a quit, followed by issuing a couple of messy API calls:
DECLARE Sleep IN WIN32API INTEGER
DECLARE TerminateProcess IN WIN32API INTEGER, INTEGER
DELCLARE INTEGER GetCurrentProcess IN WIN32API
IF VERSION(2) = 0
   ON SHUTDOWN
   CLEAR EVENTS
   CLEAR ALL
   CLOSE ALL
   RELEASE ALL
   FLUSH
   QUIT
   =SLEEP(30000)
   =TerminateProcess(GetCurrentProcess(),0)
ELSE
   CANCEL
ENDIF
This can be a messy shutdown, so keep that in mind.
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
Next
Reply
Map
View

Click here to load this message in the networking platform