|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Wed May 03, 2006 3:53 pm Post subject: OPEN for printing |
|
|
When I execute the statement
OPEN(UNIT=7, FILE='LPT1', form='PRINTER')
to create a logical unit for a printer, I get the error:
"FileStream will not open Win32 devices such as disk partitions and tape drives. Don't use "\." in your path."
research on this indicates that it happens when you put Dos reserved names (such as LPT1 etc) in a file path.
The call stack indicates that FTN95 seems to be trying to open a file:
mscorlib.dll!System.IO.FileStream.FileStream(string path = "LPT1", System.IO.FileMode mode = Open, System.IO.FileAccess ... mscorlib.dll!System.IO.FileStream.FileStream(string path = "LPT1", System.IO.FileMode mode = Open, System.IO.FileAccess ... ftn95lib1.mdl!Salford.Fortran.RTLibrary1.sys_fileOpen(<ptr>structÄUnit,<ptr>char,int,<ref>int,enumÄlogical)(Unit* unit = ... ftn95lib1.mdl!Salford.Fortran.RTLibrary1.IO_open(int recl_eqls = 0, sbyte* access = 1992820, int accessin = 0, sbyte* blank... ftn95lib1.mdl!Salford.Fortran.RTLibrary1.doIO(void)() + 0x5c9 bytes
ftn95lib1.mdl!Salford.Fortran.RTLibrary1.parseEntryCode(unsignedÄint,<ptr>void,int,enumÄActionCode)(uint code = ... ftn95lib1.mdl!Salford.Fortran.RTLibrary1._OpenC(int code = -1073706745, void* value = 15485444, int stringlength = 4...> cred01.dll!Cred01.JCRED01(INTEGER*2 db = 0, CHARACTER*-1 info = '', INTEGER*4 _length_of_info_ = 6) Line 45
I have also tried:
OPEN(UNIT=7, FILE='LPT1:')
and
OPEN(UNIT=7, FILE='LPT2:')
and
OPEN(UNIT=7, FILE='LPT1')
Do you have any thoughts? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu May 04, 2006 1:42 am Post subject: OPEN for printing |
|
|
Richard
OPEN(UNIT=7, FILE='LPT1:')
WRITE(7,*) "Hello"
works OK on my machine. You may have problems if the printer is not local or if you are connected to a network. This is one of those things that seems works on some machines but not on others. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Thu May 04, 2006 7:42 pm Post subject: OPEN for printing |
|
|
Are you running that under .Net? (sorry, should have mentioned this) |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri May 05, 2006 2:21 am Post subject: OPEN for printing |
|
|
Richard
No it does not work under .NET.
Looks like it is not designed to do this. |
|
Back to top |
|
|
|
|
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
|