LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

winXP and lpt ports

I use "openfile" to send text to a ticket printer on lpt1 (winXP prof.). After the ticket is printed I use Closefile. On some XP PC closefile comes with error -1
When I run the program on an other XP pc it works fine.
Does anyone now what the problem is ??
0 Kudos
Message 1 of 3
(3,104 Views)
Hello,
The Windows SDK also contains a OpenFile and CloseFile functions. I assume that you are using CVI OpenFile and CloseFile functions.

Do you get the error (-1 return value) persistently when used on the particular machine? Have you tried on multiple machines with the same architecture, and get the same error? If so, could you please let me know what kind of PC you are using?

Also, have you tried to use the Windows SDK OpenFile and CloseFile functions in CVI? If not, could you try and see if you still get the same error? If you include just the WINDOWS.H header file and do not include the CVI header file with the same function, the non-CVI library will typically resolve properly for a listed function that we duplicated.


Mika Fukuchi
Application Engine
er
National Instruments
0 Kudos
Message 2 of 3
(3,104 Views)
"Hello,
Yes, I have tried the same program on multiple machines with the same architecture, and I get the error on one of those machines.
Whe use a PC 1.8 Ghz Pentium 4 machine with a Soltec mainboard.

I have made a testprogram where I use fopen and fclose from ansi.h, instead of CloseFile and OpenFile from the formatio.h file. Everything works fine now.
0 Kudos
Message 3 of 3
(3,104 Views)