Hello Guys,
I have encountered a problem with printing on windows 7 from 4gl code. we have two computers(till_01 and till_02) just upgraded to Win7, and a receipt printer is installed and shared in till_01, When we tried to print a cash receipt from till_02 using the following code, we received Error "**Unable to open file: \\till_01\receipt. Errno=2.(98)"
This problem only seem to happen in a win7 to win7 environment, the printing works when one of the till is not win7. such as winXP/win7, Win2000/Win7 or XP/XP. I am not sure if it is a security issue, Can anybody shed some lights please?
Thanks in advance.
I have encountered a problem with printing on windows 7 from 4gl code. we have two computers(till_01 and till_02) just upgraded to Win7, and a receipt printer is installed and shared in till_01, When we tried to print a cash receipt from till_02 using the following code, we received Error "**Unable to open file: \\till_01\receipt. Errno=2.(98)"
Code:
DEF VAR spoolFile AS CHAR NO-UNDO.
DEF VAR cprinter AS CHAR NO-UNDO.
DEF VAR memoryFile AS MEMPTR NO-UNDO.
assign
spoolFile = "c:\temp\receipt.txt"
cprinter = "\\till_01\receipt".
FILE-INFO:FILE-NAME = spoolFile.
SET-SIZE(memoryFile) = FILE-INFO:FILE-SIZE.
INPUT FROM VALUE(spoolFile) BINARY NO-CONVERT.
IMPORT memoryFile.
INPUT CLOSE.
OUTPUT TO VALUE(cprinter) BINARY NO-CONVERT.
EXPORT memoryFile.
OUTPUT CLOSE.
SET-SIZE(memoryFile) = 0.
This problem only seem to happen in a win7 to win7 environment, the printing works when one of the till is not win7. such as winXP/win7, Win2000/Win7 or XP/XP. I am not sure if it is a security issue, Can anybody shed some lights please?
Thanks in advance.