Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete file after ShellExecute() finishes
Message
From
10/07/2003 05:59:28
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00808564
Message ID:
00808776
Views:
19
My appl cannot go to modal state : users may want to use my application
if pdf file is opened by viewing.

I cannot delete files on shutdown since adobe acrpobat and other applications
does not allow to delete the file which is opened for viewing.

So I cannot use your solutions. I'm just wondering how Outlook Express implements this:

1. I open a attached pdf file in acrobat reader
2. I close Outlook Express
3. The file opened by Acrobat Reader still exist in Temporary Internet Files directory
4. I close Acrobat Reader.
5. After that, the file disappears in the Temporary Internet Files Directory.

I'm interesting how this is implemented in OE ?
Which OS calls or tricks are used ?


>Can your app go modal while the other app is running? If so you can use the oShell.Run() command with .t. as the lat parameter.
>
>If your app can't go modal, you'll have to create a datastore to hold the filenames you created, then in your ON SHUTDOWN handler check to see if you can erase them. This might be problematic because the launched apps might still have the files open.
>
>If your app crashes you may still leave these files laying around, unless your startup goes back to the datastore and checks for files it didn't get a chance to clean up.
>
>Also note if security is a risk here remember the users are going to be able to do File/SaveAs in the other apps and replicate the data out to some other file your app doesn't know anything about.
>
>>I use Gen field to hold doc, pdf, txt, xls and other types of
>>files in my VFP 7 applicaton.
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform