2020. 3. 25. 20:59ㆍ카테고리 없음
I have tested it using a Zebra TLP 2844 over a TCP/IP network. I have not tested it over a COM or Parallel port yet, but in theory it should work. TNDK 22-Feb-11 1:32 22-Feb-11 1:32 Hi, I've been using this code as part of a program for years, and it's been working fine, until the program was installed on a computer running Win7 Now the program only works 'partly'. The thing is that the 'CreateFile' function returns '-1' from a shared printer, that connected to the same computer where the program is running (debugging in Visual Studio 2010), and so I can't get a handle to the printer. A funny thing is that if I try to print from the Win7 computer, to a printer that is shared on another computer running Windows XP everything works fine It doesn't work if I try to printer to another shared printes, on a computer running Win7 I've been wondering if Microsoft has changed how the 'CreateFile' function works in Win7 or if it's a UAC issue. Please help - Thomas. Mihai Antofi 23-Jan-09 6:05 23-Jan-09 6:05 Hello everyone!
As you can see from subject, the antivirus installed on the company's pc is blocking the process that creates the file stream. Can anyone tell me what process should be specified as an exception in the antivirus rules, so that it wouldn't be blocked. To be more specific, i'm attaching the code from SafeFileHandle = CreateFile(printerPath, GENERICWRITE, 0, SA, OPENEXISTING, 0, 0) ' Create file stream Try outFile = New FileStream(SafeFileHandle, FileAccess.Write) fileWriter = New StreamWriter(outFile) Catch ex As Exception The safefilehandle=CreateFile returns 'Nothing', and the try.catch block returns exception: Invalid handle. Parameter name: handle - from antivirus event log: Access to object C: WINNT System32 spool PRINTERS 00004.SPL was blocked by rule Anti-virus Standard Protection:Prevent remote creation/modification of executable and configuration files.
Thanks, Mihai. Hello and thank you for making it easy for others to use it. Just one query, Using vs 2008 for development, and is trying to use the code that you have mentioned. DevForRent 6-Sep-07 6:28 6-Sep-07 6:28 Hi, i this code is awesom it helped me a lot.
Thx for publixhing it But, i still can't get round an issue here, u see, i need to write multiple lines (up to 4) on the label and then a barcode with human readeable data. What happens is that if i send a string like 'hello r nJuanhello r nJuanhello r nJuan' to 1 command it writes it all in the same line and the letters overlap. So i send 1 command per word, that helped, but what actually happens it that it now writes the last word only (Juan) I'm thinking there might be a problem with the dimensions the printer gets to write the lines, like, is printing it all but not on the label. I really ran outta ideas of how to fix this, and i cannot se nowhere in the code where the label's dimensions concerning the text only are, since the bar code prints perfectly I'll be waiting for anything u can throw at me. Thx btw: i'm writing this in c#.net!
Zebra Tlp 2844 Troubleshooting
Did you get an answer? If not, let me know I'll send you some code. YOU MUST read the EPL2 manual to lookup the rules: There is a section in there with an example. Here is a sample EPL2 template: There are bascally 4 sections. 1)initialization commands 2)Variables section 3)Others(anything else, captions, line etc.) 4) the variables data values section(this is the one that will get you!) The number of variables must be equal to the number of of values lines or else. You can use the same REMOVE THIS LINE SECTION 1: O D8 S2 ZT JF I8,0 OD REMOVE THIS LINE SECTION 2: FK'FORMNAME' FS'FORMNAME' V00,40,N,' V01,40,N,' V02,25,N,' Q812,24 q812 REMOVE THIS LINE SECTION 3: A37,12,0,2,2,2,N,'CAT's NAME:' A405,43,0,3,1,1,N,'CAT'S WEIGHT:' A75,139,0,3,1,1,N,V00 A227,938,0,3,1,1,N,V01 A392,558,0,4,1,1,N,V02 FE FR'GEReturn' REMOVE THIS LINE SECTION 4:? V000DATAVALUE V001DATAVALUE V002DATAVALUE REMOVE THIS LINE P1 = print 1 page P2 means print pages and so on.: P1 FK'FORMNAME' REMOVE THIS LINE in FK'FORMNAME' the name quotes MUST be 8 chars or less I hope this helps.