| View previous topic :: View next topic |
| Author |
Message |
bort Newbie
Joined: 23 Nov 2004 Posts: 3
|
Posted: Tue Nov 23, 2004 1:31 pm Post subject: reset printer using vdsdll |
|
|
I'm trying to write an application that sends a reset instruction to a printer. the application will run on a windows 2000 computer, the printer is connected to LPT1 via a parallel cable.
Now, interfacing parallel ports really is a terra incognita for me, but after having done some reading I think I know what I'm supposed to do, i.e. send a signal through pin 16, the second bit in register base + 2, the control register. I'm using vds.dll and UserPort to communicate with the port, but my printer does not react in any way to what I'm doing.
this is what I send to vdsdll:
| Code: | | DLL IO,OUT,$37A,00000100 |
something does happen, when I use a port monitor (parallel port monitor by neil fraser), the initialise printer bit is set to active, but, as I said, my printer does not respond to this instruction.
any suggestions?
regards,
bert coenen
law library
KULeuven
leuven (Belgium) |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Nov 23, 2004 1:39 pm Post subject: |
|
|
Hi Bert, welcome to VDSWORLD... Could it be possible that your printer uses a different instruction set then "normal" printers? Maybe you should look what instruction your computer itself sends to your printer to reset it?
Btw. I added the [code] and [/code] tag to your post. With these tags, you can convert code into highlited code on this forum...  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
bort Newbie
Joined: 23 Nov 2004 Posts: 3
|
Posted: Tue Nov 23, 2004 1:51 pm Post subject: reset printer |
|
|
define "normal" printers? it's a HP LaserJet 6P.
I don't know how to reset the printer from my computer, I can cancel all documents, but isn't that just for documents in the print queue? when I use the cancel function in my driver control panel, I don't see any traffic over the parallel port.
the reason why I need to reset is: I need to clear the printer's buffer to remove any uncompleted documents before sending another document to the printer.
thanks for the reply. |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Nov 23, 2004 1:52 pm Post subject: |
|
|
I don't know anything about VDs DLL, but when I last wrote some software to interface with I/O ports, it didn't work under NT operating systems, because Windows doesn't allow direct port access. You need to install a special driver. I seem to recall that I used the DriverLinx Port I/O driver, from http://www.driverlinx.com/DownLoad/DlPortIO.htm. I also seem to recall that I had to rewrite my code so that it called routines in the driver DLL to talk to the port. It was a long time ago, and I don't have a copy of the code any more. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Nov 23, 2004 1:56 pm Post subject: |
|
|
Having seen what you are trying to do, I think you are going to have a problem. Even if you use the driver as I suggested, I think there is going to be a problem because your driver and the printer driver are going to be fighting over the printer port. NT is not like 9x where anything can write to a port regardless of what else is using it.
I think you have to try to find out if there is a way to tell the printer driver to reset the printer. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Nov 23, 2004 1:56 pm Post subject: |
|
|
Well, with "normal" printers I ment printers which are using commands which are specified in protocols. A lot of printers do not, that's why they often need special drivers to run. Maybe you can contact HP if they have some schemes lying around which you can use to see if you are sending the right instruction?  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
bort Newbie
Joined: 23 Nov 2004 Posts: 3
|
Posted: Tue Nov 23, 2004 1:57 pm Post subject: port access |
|
|
| that's what UserPort is for, to allow port access in W2k. I do have access to the port, that does not seem to be the problem. |
|
| Back to top |
|
 |
|