>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