Writing to Parallel port (or serial) under Win2k

Started by
4 comments, last by dannyxyz23 21 years, 2 months ago
How do I C++ write to the parallel or serial port under such a protected memory system like Win2k? Thanks in advance
Advertisement
Yes, it is possible. I had to do it awhile back for college and some can up with WinIO. It''s a good usefull lib that''s easy to use and easy to understand.

Sand Hawk

----------------

(Inspired by Pouya)
----------------(Inspired by Pouya)
I made a project a couple of months ago (for Win98) that used a library called DLPORTIO to access the parallel port during a DX app. I don´t have the exact URL, but a fast search at google will help you.
This might work, not 100% sure tho'':

Serial Output:

__asm {
mov ah,40h;
mov bx,3;
mov cx,bufferSizeinBytes;
mov dx,offset buffer;
int 21h;
}

For parallel it''s the same thing except mov bx,4 instead of mov bx,3

Serial Input:

__asm {
mov ah,3fh;
mov bx,3;
mov cx,maxBufferSizeinBytes;
mov dx,offset buffer;
int 21h;
}

Again, parallel changes 3 to 4.

-- Exitus Acta Probat --
I think W2K will barf on that int21 instruction. Follow Sand_Hawk''s advice.


"It is always a simple matter to drag the people along, whether it is a democracy, or a fascist dictatorship, or a parliament, or a communist dictatorship. Voice or no voice, the people can always be brought to the bidding of their leaders. That is easy. All you have to tell them is that they are being attacked and denounce the peacemakers for lack of patriotism and exposing the country to danger. It works the same in any country."
Hermann Goering
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
There''s a freeware program called UserPort.EXE (and associated DLL file) that does what you want.

This topic is closed to new replies.

Advertisement