forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


reset printer using vdsdll

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
bort
Newbie


Joined: 23 Nov 2004
Posts: 3

PostPosted: Tue Nov 23, 2004 1:31 pm    Post subject: reset printer using vdsdll Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Nov 23, 2004 1:39 pm    Post subject: Reply with quote

Hi Bert, welcome to VDSWORLD... Smile 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... Smile

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
bort
Newbie


Joined: 23 Nov 2004
Posts: 3

PostPosted: Tue Nov 23, 2004 1:51 pm    Post subject: reset printer Reply with quote

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
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Nov 23, 2004 1:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Nov 23, 2004 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Nov 23, 2004 1:56 pm    Post subject: Reply with quote

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? Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
bort
Newbie


Joined: 23 Nov 2004
Posts: 3

PostPosted: Tue Nov 23, 2004 1:57 pm    Post subject: port access Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group