Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not Release the EXE!
Message
 
To
17/05/2002 12:57:32
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00658311
Message ID:
00658354
Views:
10
>Hi,
>
>I Created a simple EXE using the following code (for demonstrating the problem)
>
>*: MAIN.PRG
>Define Class TESTME As Custom
> Procedure Process
> Wait Window "Testing Exe"
> Return
> Endproc
>Enddefine
>* End
>
>
>After compiling this into Test.EXE, I issued the following commands at the command Prompt.
>oRun = NewObject("TESTME","TEST.EXE")
>oRun.PROCESS() && shows "Testing Exe" here
>oRun=.null.
>RELEASE oRun
>
>Now the Problem is, even after I release the 'oRun' object, I can not Delete 'TEST.EXE'. The message says, there has been a sharing violation, the source file may be in use. But once I Issue, Clear All command, I can Delete.
>
>Do you know what could be holding up a reference here that keeps the exe still open?
>
>TIA

You can also add

CLEAR CLASS testme

after
RELEASE oRun

and you will be able to delete the EXE.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform