dmcafee at pacbell.net
dmcafee at pacbell.net
Sun Feb 6 16:15:24 CST 2005
Upon executing the app that was inadvertently closed, can you check for last opened app and close if in open state? Kind of like (Do I dare say it?) word 97 recovery when shutting down incorrectly and reopening Word, not the doc itself. If this is in Access, can you open a hidden start up form that prevents the app from closing until the file is itself closed? David McAfee -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim Lawrence Sent: Sunday, February 06, 2005 1:45 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT: API calls Hi All: This is an OT subject but it has to do with opening and closing files. This application that I wrote opens files using the CreateFile API and does a fine job after the process is finished the CloseHandle API is used to tidy up and everything works fine. ..but if the program is inadvertently directly closed, without going through the appropriate step the file previously opened is not closed correctly. The file can now not be opened by any apparent method and it requires a computer boot to unlock it. (The file in question is not damaged in anyway but the system keeps the file locked.) Does anyone know how to open/close such a problem file? Any suggestions would be greatly appreciated. Code suggestions would of course be best. MTIA Jim PS Wrote a little pseudo editor that can view a file of any size and it works great; with one exception. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com