forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File delete under WinXP

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Thu Sep 07, 2006 3:30 am    Post subject: File delete under WinXP Reply with quote

Is there any prospect of system routines like erase@ being "modernised" to cope with the advent of WinXP? Or a FORTRAN 90 standard way to achieve the same thing, that I am not aware of? I have a number of applications that make use of this routine, and it only works under WinXP when run by someone with admin rights. Most commonly, these applications are maintaining an ini file and its previous incarnation, so that every time a setting gets changed, the previous incarnation gets erased, the current ini file becomes the previous incarnation, and a new ini file is born.
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Thu Sep 07, 2006 7:10 am    Post subject: File delete under WinXP Reply with quote

Andy

erase@ makes a call to the Windows API function BOOL DeleteFile(LPCTSTR lpFileName).

This will fail if the file has read access, if the file is open or if the user does not have delete access.
The error code in erase@ is the code returned by GetLastError() after the call to DeleteFile.

If this information does not help you to fix the problem and you can find an API function (such as SHFileOperation) that does what you want then we could provide a simple interface and put it in the library.

I do not think SHFileOperation will help you with your problem but I think it does have the advantage that it allows the programmer to use the Recycle bin.

Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group