Searching \ for '[OT]: Access the WIndows API or WinSpool or Port f' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ios.htm?key=port
Search entire site for: 'Access the WIndows API or WinSpool or Port f'.

Exact match. Not showing close matches.
PICList Thread
'[OT]: Access the WIndows API or WinSpool or Port f'
2000\07\28@181223 by jamesnewton

picon face
Any ASP/VBScript/JScript gurus out there?

I need to take a raw print file and send it to the local printer in a vbs
for the local intranet. IE 5.0 with the intra-net zone security set off for
ActiveX Controls.

I can do this easily for any network printer by using FSO to copy (not
write, due to binary data issues) the file to \\server\printer. Works fine.
But I can't copy the file to LPT1 or PRINTER$ or LPT1.DOS or \my machine\my
printer share or any damn thing else for the printer that is sitting right
here.

I've found bunches of code on how to send a raw print file to a local
printer via Win32API calls to WINSPOOL.DLL in Visual Basic. E.g.
support.microsoft.com/support/kb/articles/Q154/0/78.ASP
Send Raw Data to a Printer Using the Win32 API from Visual Basic

The trick is, I don't have VB (and I really don't want to learn it) I just
need to find a way to:

A) call winAPI function in winspool.dll from VBScript
OR
B) copy binary data directly to the printer port.
OR
C) find someone to take the code in the link above and turn it into an ASP
component (ActiveX control)

Any ideas? I can't believe this is kicking my ASS!! x3 days now! Simple
little think like sending a binary to the local port!!!!

---
James Newton (PICList Admin #3)
spam_OUTjamesnewtonTakeThisOuTspampiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

2000\07\29@020926 by Robert A. LaBudde

flavicon
face
At 03:11 PM 7/28/00 -0700, James wrote:
>Any ASP/VBScript/JScript gurus out there?
>
>I need to take a raw print file and send it to the local printer in a vbs
>for the local intranet. IE 5.0 with the intra-net zone security set off for
>ActiveX Controls.
>
>I can do this easily for any network printer by using FSO to copy (not
>write, due to binary data issues) the file to \\server\printer. Works fine.
>But I can't copy the file to LPT1 or PRINTER$ or LPT1.DOS or \my machine\my
>printer share or any damn thing else for the printer that is sitting right
>here.

Your problem is that you need to create a alias for the printer that is
acceptable to the command processor.

This is done by:

At CMD prompt:

Net use LPT2: \\This_Machine\printer_share

(note: server name and the printer port)

To remove:

Net use /d LPT2 (note: d for delete)

Remains until removed on that computer!

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ralspamKILLspamlcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"
================================================================

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\07\29@101523 by piclist.com

face picon face
I think you missed a detail in my post. I can work just fine with
\\server\port. What doesn't work is the local LPT1. Doing NET USE LPT1
\\mymachine\myprinter
results in "can't perform this action on your own computer" or like that.

The point is that what should be hard (sending binary, raw data to a port on
the network) is easy and what should be easy (just sending binary, raw data
to the local LPT1 port) is apparently impossible without a custom ActiveX
control. Amazing isn't it.

James Newton, PICList Admin #3
.....jamesnewtonKILLspamspam.....piclist.com
1-619-652-0593 phone
http://www.piclist.com

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...