View previous topic :: View next topic |
Author |
Message |
KennyT
Joined: 02 Aug 2005 Posts: 318
|
Posted: Mon Sep 24, 2012 9:32 am Post subject: Win32 error detected in WrSeqFrm : The handle is invalid |
|
|
"Win32 error detected in WrSeqFrm : The handle is invalid"
Anyone seen this error?
It occurs when trying to write to a text file:
Code: |
open (99, file= tmpfil, status='new', form='formatted' ,err=999)
write (99,'(A)') username
|
There isn't an error on the open call. The file is called "F$123456.TMP" and is created but is empty (obviously!).
Any suggestions of a workaround?
K |
|
Back to top |
|
 |
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: D�sseldorf, Germany
|
Posted: Mon Sep 24, 2012 11:14 am Post subject: |
|
|
Hmmm, very strange... I tried this code without any problems - can you test it also to see if it runs?
Code: | program test
IMPLICIT NONE
integer*4 rtcode
character*120 tfile
call temp_file@(tfile,rtcode)
open(77,file=tfile,err=300,form='formatted',status='new')
write(77,'(A)',err=300)'hello'
300 close(77)
end |
Regards - Wilfried |
|
Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 318
|
Posted: Mon Sep 24, 2012 11:24 am Post subject: |
|
|
Thanks for replying.
I should have said that I don't get this error myself, it only happens on a client's setup. The file is on a server. I've asked the client to see if he can edit the created file manually using notepad and he says he can. The permissions for the folder are set to "full control" for "everyone".
I'm going to try sending a patch to try writing to a file without a "$" in the name, just in case that's the problem...
K |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Sep 24, 2012 7:26 pm Post subject: |
|
|
I can confirm that the error report is generated from the Fortran IO routines in salflibc.dll but the nature of the error is not immediately obvious.
Presumably the file can be opened but write access is restricted for some reason. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Tue Sep 25, 2012 1:50 am Post subject: |
|
|
Kenny,
I would include an IOSTAT= in the open and write. This might give some more information. Also a simple program like Wilfred's would be a useful test options.
I am finding a lot of difficult restrictions with Windows 7 to "System" directories, like C:\ and C:\WINDOWS.
The latest I found was I could not copy a file to C:\ from a network directory, but could from c:\temp, after confirming that I want to !! From this it appears that Win7 treats network directories differently from local directories, which might give you some clue.
It gets annoying that there are all these restrictions, even when I have administrator rights.
Have you located the virtual directory for restricted files ?
\Users\<your name>\AppData\Local\VirtualStore\Windows/sdbg.ini
Work arounds appear to be there but do imply different program settings for XP and Win7
John |
|
Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 318
|
Posted: Tue Sep 25, 2012 2:56 am Post subject: |
|
|
Thanks for the suggestion, John.
IOSTAT returned is "10006". Can someone suggest what that means?
K |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Sep 26, 2012 11:09 am Post subject: |
|
|
As far as I can tell the error for 10006 is the same as before "Invalid handle". |
|
Back to top |
|
 |
|