PowerBASIC Peer Support Forums
 

Go Back   PowerBASIC Peer Support Forums > User to user Discussions > PowerBASIC for Windows

PowerBASIC for Windows User to user discussions about the PB/Win (formerly PB/DLL) product line. Discussion topics include PowerBASIC Forms, PowerGEN and PowerTree for Windows.

Reply
 
Thread Tools Display Modes
  #16  
Old Apr 26th, 2012, 09:11 AM
Steve Bouffe Steve Bouffe is offline
Member
 
Join Date: May 1999
Location: Chelmsford Essex, UK
Posts: 791
Hi Gary,

Tried this but still Error 68

Code:
LOCAL PPP as string

PPP = "\\dispatch1\Epson LX-300+II ESCP"

LPRINT ATTACH UCODE$(PPP)

PRINT ERR
Reply With Quote
  #17  
Old Apr 26th, 2012, 09:30 AM
Gary Beene Gary Beene is online now
Administrator
 
Join Date: May 2008
Location: Dallas, Tx
Posts: 9,806
Hi Steve,
Looks like you did as Bob suggested - so back to Bob!
__________________
Reply With Quote
  #18  
Old Apr 26th, 2012, 10:00 AM
Michael Mattias Michael Mattias is offline
Member
 
Join Date: Aug 1998
Location: Racine WI USA
Posts: 36,234
If fixed in 6.0.2 and later (broke 6.0.0. and 6.0.1) (Actual facts unknown)
Code:
MACRO ATTACH_PRINTER (sPrinter) 

  MACROTEMP  sP 
  DIM  sp AS STRING 

  SP = sPrinter
#IF %PB_REVISION AND &h0600) = &h0600  ' if PB CC 6.0 
 #IF (%PB_REVISION AND &h00FF) < &h02  ' if less than fixed version 
      Sp = UCODE$ (SPrinter)           ' required conversion 
 #ENDIF
#ENDIF
 
  LPRINT ATTACH SP 

END MACRO 



.... 

     ATTACH_PRINTER ("LPT1") 

....
Close, I think . You get the idea.

MCM
Reply With Quote
  #19  
Old Apr 26th, 2012, 11:13 AM
Paul D. Elliott Paul D. Elliott is offline
Member
 
Join Date: May 2002
Location: some hill in WV
Posts: 1,124
I don't know if this has any bearing on the LPrint Attach problem but
I've been using the XPrint Attach for many months. After the last round
of XP updates, I can no longer connect to my W2K system for printing.
It worked fine last week.

Today I couldn't setup a share to the W2K LPT1 printer. The error kept
coming up that the spooler service wasn't running. Same error when
trying to get W2K printer status via Printer Control panel.

Just thought I'd toss that info out there.
Reply With Quote
  #20  
Old Apr 26th, 2012, 12:04 PM
Steve Bouffe Steve Bouffe is offline
Member
 
Join Date: May 1999
Location: Chelmsford Essex, UK
Posts: 791
Could be something to do with Win 7 as the previous installation was XP Pro and I haven't changed anything else.
Reply With Quote
  #21  
Old Apr 26th, 2012, 08:10 PM
Paul D. Elliott Paul D. Elliott is offline
Member
 
Join Date: May 2002
Location: some hill in WV
Posts: 1,124
From your Win 7 computer, can you ping the dispatch1 computer?
Is it possible that during the update something got disconnected between
the 2 computers ( maybe different IP for dispatch1 that didn't survive the
update ) or maybe something to do with UAC rights between the 2?
Reply With Quote
  #22  
Old Apr 27th, 2012, 04:57 AM
Steve Bouffe Steve Bouffe is offline
Member
 
Join Date: May 1999
Location: Chelmsford Essex, UK
Posts: 791
Yes can ping it ok.

Did a clean install. Can print to the printer within windows from any other worstation. Also can print to it with DDOC just can use LPRINT ATTACH

I remember that this was a problem in the compiler that was fixed but seems it's back for me.

Last edited by Steve Bouffe; Apr 27th, 2012 at 05:13 AM.
Reply With Quote
  #23  
Old Apr 27th, 2012, 06:31 AM
Paul D. Elliott Paul D. Elliott is offline
Member
 
Join Date: May 2002
Location: some hill in WV
Posts: 1,124
How about setting it as the default printer and doing LPrint Attach Default ?
Then check out what LPrint$ shows as the printer name.
Reply With Quote
  #24  
Old Apr 27th, 2012, 07:17 AM
paul d purvis paul d purvis is offline
Member
 
Join Date: Mar 2003
Posts: 1,467
FWIW
I have found it less troublesome to create a windows printer device and set up the share in the printer device.
Of course our workstations are few in number at each location.
I am not sure that this will solve your problem.
Of course the printer device name spools printout so that way it could help or hurt you depending on your situation.
__________________
p purvis
Reply With Quote
  #25  
Old Apr 27th, 2012, 09:23 AM
Michael Mattias Michael Mattias is offline
Member
 
Join Date: Aug 1998
Location: Racine WI USA
Posts: 36,234
Quote:
Could be something to do with Win 7 as the previous installation was XP Pro and I haven't changed anything else
Well, changing "only" the operating system is changing a lot; so yes, your problem definitely could be something related to the new O/S and how you have set things up.
Reply With Quote
  #26  
Old Apr 28th, 2012, 07:24 PM
Bud Durland Bud Durland is offline
Member
 
Join Date: Jan 1999
Posts: 432
Quote:
Originally Posted by Steve Bouffe View Post
Hi Gary,

Tried this but still Error 68

Code:
LOCAL PPP as string

PPP = "\\dispatch1\Epson LX-300+II ESCP"

LPRINT ATTACH UCODE$(PPP)

PRINT ERR
what OS is 'dispatch1' running? During a recent upgrade/conversion at work, we found that LPRINT ATTACH commands that would work just fine on shares hosted on 32bit Windows 2003 would fail (Err 68) on 64Bit Windows 2008R2

This is a couple months ago, I don't recall what revision of PB/Win 10 we were using. I haven't had a chance lately to test the problem further.
__________________
Real programmers use a magnetized needle and a steady hand
Reply With Quote
  #27  
Old May 3rd, 2012, 04:11 PM
Steve Bouffe Steve Bouffe is offline
Member
 
Join Date: May 1999
Location: Chelmsford Essex, UK
Posts: 791
All systems in the network except the server are running Win7 32bit
Reply With Quote
  #28  
Old May 3rd, 2012, 04:28 PM
Skip Osterhus Skip Osterhus is online now
Member
 
Join Date: Mar 2002
Location: Okemos, Michigan
Posts: 112
Steve -

FWIW - In message #1 and #11 you referred to your printer as
Printer_Name_GL = "\\dispatch\EPSON LX-300+II".

In message #16 it is
PPP = "\\dispatch1\Epson LX-300+II ESCP".

Maybe significant, maybe not? Also I see in the 9.05 docs that
the printer name cannot exceed 32 characters. The last
referenced one was 32 exactly.

You might try a shorter name.

Skip
Reply With Quote
  #29  
Old May 8th, 2012, 02:10 PM
Conrad Hoffman Conrad Hoffman is offline
Member
 
Join Date: Nov 2006
Location: Canandaigua, NY
Posts: 330
I recently got a report that one of my programs gives a message to install a printer when the printer is already installed. This is on a Win7 64 bit machine, AMD I think. The program has been used by thousands of people and this is the first complaint of its type. I'll have to look into it, but first I have to find somebody with said OS and machine. Sounds similar to what's been discussed here.
Reply With Quote
  #30  
Old May 10th, 2012, 06:35 AM
Joost Kant Joost Kant is offline
Member
 
Join Date: Feb 2008
Posts: 8
Quote:
Originally Posted by Bob Zale View Post
Steve, please note the explanation:

It must be an ANSI string with a UCODE$() override. Nothing else will work.

You are trying to use a wide unicode string with a UCODE$() override. Should be:

LOCAL Printer_Name AS STRING


Bob
Hi Bob,

I have the same problem, but it is not resolved bij overriding the Ansi string to Unicode. I used:

DIM PrinterName as STRING
PrinterName=\\Server\LabelPrinter-1
LPRINT ATTACH UCODE$(PrinterName)

and get a 'Device Unable' (68) Error.

When I redirect the printer with NET USE LPT1: \\Server\LabelPrinter-1 and change the source with:
PrinterName="LPT1"

then it works fine. But my application has to print to more than one network printer and I do'nt want to SHELL to execute then 'NET USE' command.

What is wrong?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:54 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1999-2011 PowerBASIC, Inc. All Rights Reserved.
Error in my_thread_global_end(): 1 threads didn't exit