Parallel port direction - from customized driver

Hi ,

How to set the parallel port direction from user mode or kernel mode.

Linux provides IOCTL to set the port direction. How can this be achieved in Windows.

Note: Parport.sys is not in picture. It has been replaced by my customized driver.

?
Thanks
Anshul Makkar
www.justkernel.com

And there isn’t an existing IOCTL that changes the port direction? And of course your driver is supporting all the existing IOCTLs supported by the par port.sys? In other words, I couldn’t tell the difference between my system without your driver and your system with your driver?

Why did you replace par port.sys?

Gary Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:

Hi ,

How to set the parallel port direction from user mode or kernel mode.
Linux provides IOCTL to set the port direction. How can this be achieved in Windows.

Note: Parport.sys is not in picture. It has been replaced by my customized driver.

Thanks
Anshul Makkar
www.justkernel.com


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

The difference is that my driver access the parallel port directly using IO-Range address (READ/WRITE_PORT_UCHAR). 0x378 , 0x379 and 0x37a… It has no dependency on parport.sys.

Its basically for virtualization product where I need to expose the raw port to guest…

Now I want to expose the functionality of SetPortDirection to guest., thus wondering how to achieve this…

?
Thanks
Anshul Makkar
www.justkernel.com


From: Gary Little
To: Windows System Software Devs Interest List
Sent: Wednesday, 21 March 2012 7:55 PM
Subject: Re: [ntdev] Parallel port direction - from customized driver

And there isn’t an existing IOCTL that changes the port direction? And of course your driver is supporting all the existing IOCTLs supported by the par port.sys? In other words, I couldn’t tell the difference between my system without your driver and your system with your driver?

Why did you replace par port.sys?

Gary Little
H (952) 223-1349
C (952) 454-4629?
xxxxx@comcast.net

On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:

Hi ,
>
>
>How to set the parallel port direction from user mode or kernel mode.
>
>Linux provides IOCTL to set the port direction. How can this be achieved in Windows.
>
>
>Note: Parport.sys is not in picture. It has been replaced by my customized driver.
>
>?
>Thanks
>Anshul Makkar
>www.justkernel.com
>
>—
>NTDEV is sponsored by OSR
>
>For our schedule of WDF, WDM, debugging and other seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Sorry, maybe it’s the codeine again kicking in again, but why are you asking? It’s your driver, what provision have you made in your driver for handling such requests? Have you not created an entire set of privately rolled IOCTLs to do what ever it is you want to do?

Your actually trying to allow an application to access that port? Or by guest you mean a kernel driver in the guest OS that has acquired this as it’s set of resources? The first idea is simply brain dead (sorry, remember the codeine ). For the guest I go back to the set of ICTLs you need to define.

Gary Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

On Mar 21, 2012, at 9:32 AM, anshul makkar wrote:

The difference is that my driver access the parallel port directly using IO-Range address (READ/WRITE_PORT_UCHAR). 0x378 , 0x379 and 0x37a… It has no dependency on parport.sys.

Its basically for virtualization product where I need to expose the raw port to guest…

Now I want to expose the functionality of SetPortDirection to guest., thus wondering how to achieve this…

Thanks
Anshul Makkar
www.justkernel.com

From: Gary Little
> To: Windows System Software Devs Interest List
> Sent: Wednesday, 21 March 2012 7:55 PM
> Subject: Re: [ntdev] Parallel port direction - from customized driver
>
> And there isn’t an existing IOCTL that changes the port direction? And of course your driver is supporting all the existing IOCTLs supported by the par port.sys? In other words, I couldn’t tell the difference between my system without your driver and your system with your driver?
>
> Why did you replace par port.sys?
>
> Gary Little
> H (952) 223-1349
> C (952) 454-4629
> xxxxx@comcast.net
>
>
> On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:
>
>> Hi ,
>>
>> How to set the parallel port direction from user mode or kernel mode.
>> Linux provides IOCTL to set the port direction. How can this be achieved in Windows.
>>
>> Note: Parport.sys is not in picture. It has been replaced by my customized driver.
>>
>> Thanks
>> Anshul Makkar
>> www.justkernel.com
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Correct… I can export IOCTL or something to set port direction. But how to achieve this functionality in my driver. Do I need to set certain bit in control register to set the direction.

?
Thanks
Anshul Makkar
www.justkernel.com


From: Gary Little
To: Windows System Software Devs Interest List
Sent: Wednesday, 21 March 2012 8:10 PM
Subject: Re: [ntdev] Parallel port direction - from customized driver

Sorry, maybe it’s the codeine again kicking in again, but why are you asking? It’s your driver, what provision have you made in your driver for handling such requests? Have you not created an entire set of privately rolled IOCTLs to do what ever it is you want to do?

Your actually trying to allow an application to access that port? Or by guest you mean a kernel driver in the guest OS that has acquired this as it’s set of resources? The first idea is simply brain dead (sorry, remember the codeine ). For the guest I go back to the set of ICTLs you need to define.

Gary Little
H (952) 223-1349
C (952) 454-4629?
xxxxx@comcast.net

On Mar 21, 2012, at 9:32 AM, anshul makkar wrote:

The difference is that my driver access the parallel port directly using IO-Range address (READ/WRITE_PORT_UCHAR). 0x378 , 0x379 and 0x37a… It has no dependency on parport.sys.
>
>
>Its basically for virtualization product where I need to expose the raw port to guest…
>
>
>
>Now I want to expose the functionality of SetPortDirection to guest., thus wondering how to achieve this…
>
>?
>Thanks
>Anshul Makkar
>www.justkernel.com
>
>
>
>
> ________________________________
> From: Gary Little
>To: Windows System Software Devs Interest List
>Sent: Wednesday, 21 March 2012 7:55 PM
>Subject: Re: [ntdev] Parallel port direction - from customized driver
>
>
>And there isn’t an existing IOCTL that changes the port direction? And of course your driver is supporting all the existing IOCTLs supported by the par port.sys? In other words, I couldn’t tell the difference between my system without your driver and your system with your driver?
>
>
>Why did you replace par port.sys?
>
>
>
>Gary Little
>H (952) 223-1349
>C (952) 454-4629?
>xxxxx@comcast.net
>
>
>
>On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:
>
>Hi ,
>>
>>
>>How to set the parallel port direction from user mode or kernel mode.
>>
>>Linux provides IOCTL to set the port direction. How can this be achieved in Windows.
>>
>>
>>Note: Parport.sys is not in picture. It has been replaced by my customized driver.
>>
>>?
>>Thanks
>>Anshul Makkar
>>www.justkernel.com
>>
>>—
>>NTDEV is sponsored by OSR
>>
>>For our schedule of WDF, WDM, debugging and other seminars visit:
>>http://www.osr.com/seminars
>>
>>To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>—
>NTDEV is sponsored by OSR
>
>For our schedule of WDF, WDM, debugging and other seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
>—
>NTDEV is sponsored by OSR
>
>For our schedule of WDF, WDM, debugging and other seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

it sounds like you are trying to do IO for a device about which you nothing. Thats about like a blind man flying a 747; theres really only one outcome that can be guaranteed. You need, no, you HAVE TO HAVE the specification for the device, which more than likely you can find on the internet, in which case Bing, not Google that nasty overly commercialized evil corporation, is your friend. You could find the IOCTL used by parport.sys and base your code on that, but you still really need to know how to control the device from the ground up since you decided you needed to write your driver from the ground up.

Gary Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

On Mar 21, 2012, at 11:00 AM, anshul makkar wrote:

Correct… I can export IOCTL or something to set port direction. But how to achieve this functionality in my driver. Do I need to set certain bit in control register to set the direction.

Thanks
Anshul Makkar
www.justkernel.com

From: Gary Little
> To: Windows System Software Devs Interest List
> Sent: Wednesday, 21 March 2012 8:10 PM
> Subject: Re: [ntdev] Parallel port direction - from customized driver
>
> Sorry, maybe it’s the codeine again kicking in again, but why are you asking? It’s your driver, what provision have you made in your driver for handling such requests? Have you not created an entire set of privately rolled IOCTLs to do what ever it is you want to do?
>
> Your actually trying to allow an application to access that port? Or by guest you mean a kernel driver in the guest OS that has acquired this as it’s set of resources? The first idea is simply brain dead (sorry, remember the codeine ). For the guest I go back to the set of ICTLs you need to define.
>
> Gary Little
> H (952) 223-1349
> C (952) 454-4629
> xxxxx@comcast.net
>
>
> On Mar 21, 2012, at 9:32 AM, anshul makkar wrote:
>
>> The difference is that my driver access the parallel port directly using IO-Range address (READ/WRITE_PORT_UCHAR). 0x378 , 0x379 and 0x37a… It has no dependency on parport.sys.
>>
>> Its basically for virtualization product where I need to expose the raw port to guest…
>>
>> Now I want to expose the functionality of SetPortDirection to guest., thus wondering how to achieve this…
>>
>> Thanks
>> Anshul Makkar
>> www.justkernel.com
>>
>> From: Gary Little
>> To: Windows System Software Devs Interest List
>> Sent: Wednesday, 21 March 2012 7:55 PM
>> Subject: Re: [ntdev] Parallel port direction - from customized driver
>>
>> And there isn’t an existing IOCTL that changes the port direction? And of course your driver is supporting all the existing IOCTLs supported by the par port.sys? In other words, I couldn’t tell the difference between my system without your driver and your system with your driver?
>>
>> Why did you replace par port.sys?
>>
>> Gary Little
>> H (952) 223-1349
>> C (952) 454-4629
>> xxxxx@comcast.net
>>
>>
>> On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:
>>
>>> Hi ,
>>>
>>> How to set the parallel port direction from user mode or kernel mode.
>>> Linux provides IOCTL to set the port direction. How can this be achieved in Windows.
>>>
>>> Note: Parport.sys is not in picture. It has been replaced by my customized driver.
>>>
>>> Thanks
>>> Anshul Makkar
>>> www.justkernel.com
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

anshul makkar wrote:

Correct… I can export IOCTL or something to set port direction. But
how to achieve this functionality in my driver. Do I need to set
certain bit in control register to set the direction.

If you don’t know how the parallel port hardware works, how can you
possibly hope to write a driver to support it?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Why ask us? How are we supposed to know? It’s YOUR device, or you are
writing this for someone else. In either case, you and you alone, are
responsible for getting the documentation you need. So the way you
achieve this functionality in your driver is that you do whatver the magic
unspecified (at least to us) interface requires you to do. RTFM. You have
it, we don’t. If you don’t have it, GTFM first.

Note that we have already pointed out the absolute insanity of building
ANY product in 2012 that uses a deprecated physical interface. Note also
that if you get this driver to work with YOUR parallel port, there is no
guarantee that it will work with any OTHER parallel port in the (unlikely)
event someone who has a parallel port buys your device (be prepared for a
high return rate; the salescritter says “do you have a prallel port?” and
buyer says “What’s that?” Salescritter says, “It’s what you plug a
printer into” and buyer, thinking of his or her printer, which plugs into
the USB port, says, “Sure, I’ve got one of those.” Now imagine the
conversation an hour or a day later.

And PLEASE don’t try to explain “it’s a standard parallel port” because
these have not existed for many years. There were several DIFFERENT
implementations of “parallel ports” and one of the many differences in
these ports was the way input was handled. And this was true by the early
1990s.

“The great thing about standards is that you have so many to choose from”
[Grace Murray Hopper]

Or, can you sucessfully answer this question: I need to disable interrupts
on my device. What bit do I set to do this?
joe

Correct… I can export IOCTL or something to set port direction. But how
to achieve this functionality in my driver. Do I need to set certain bit
in control register to set the direction.

 
Thanks
Anshul Makkar
www.justkernel.com


From: Gary Little
> To: Windows System Software Devs Interest List
> Sent: Wednesday, 21 March 2012 8:10 PM
> Subject: Re: [ntdev] Parallel port direction - from customized driver
>
>
> Sorry, maybe it’s the codeine again kicking in again, but why are you
> asking? It’s your driver, what provision have you made in your driver for
> handling such requests? Have you not created an entire set of privately
> rolled IOCTLs to do what ever it is you want to do?
>
> Your actually trying to allow an application to access that port? Or by
> guest you mean a kernel driver in the guest OS that has acquired this as
> it’s set of resources? The first idea is simply brain dead (sorry,
> remember the codeine ). For the guest I go back to the set of ICTLs you
> need to define.
>
>
>
> Gary Little
> H (952) 223-1349
> C (952) 454-4629
> xxxxx@comcast.net
>
>
>
> On Mar 21, 2012, at 9:32 AM, anshul makkar wrote:
>
> The difference is that my driver access the parallel port directly using
> IO-Range address (READ/WRITE_PORT_UCHAR). 0x378 , 0x379 and 0x37a… It has
> no dependency on parport.sys.
>>
>>
>>Its basically for virtualization product where I need to expose the raw
>> port to guest…
>>
>>
>>
>>Now I want to expose the functionality of SetPortDirection to guest.,
>> thus wondering how to achieve this…
>>
>>
>>Thanks
>>Anshul Makkar
>>www.justkernel.com
>>
>>
>>
>>
>> ________________________________
>> From: Gary Little
>>To: Windows System Software Devs Interest List
>>Sent: Wednesday, 21 March 2012 7:55 PM
>>Subject: Re: [ntdev] Parallel port direction - from customized driver
>>
>>
>>And there isn’t an existing IOCTL that changes the port direction? And of
>> course your driver is supporting all the existing IOCTLs supported by the
>> par port.sys? In other words, I couldn’t tell the difference between my
>> system without your driver and your system with your driver?
>>
>>
>>Why did you replace par port.sys?
>>
>>
>>
>>Gary Little
>>H (952) 223-1349
>>C (952) 454-4629
>>xxxxx@comcast.net
>>
>>
>>
>>On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:
>>
>>Hi ,
>>>
>>>
>>>How to set the parallel port direction from user mode or kernel mode.
>>>
>>>Linux provides IOCTL to set the port direction. How can this be achieved
>>> in Windows.
>>>
>>>
>>>Note: Parport.sys is not in picture. It has been replaced by my
>>> customized driver.
>>>
>>>
>>>Thanks
>>>Anshul Makkar
>>>www.justkernel.com
>>>
>>>—
>>>NTDEV is sponsored by OSR
>>>
>>>For our schedule of WDF, WDM, debugging and other seminars visit:
>>>http://www.osr.com/seminars
>>>
>>>To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>—
>>NTDEV is sponsored by OSR
>>
>>For our schedule of WDF, WDM, debugging and other seminars visit:
>>http://www.osr.com/seminars
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>>—
>>NTDEV is sponsored by OSR
>>
>>For our schedule of WDF, WDM, debugging and other seminars visit:
>>http://www.osr.com/seminars
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Well, part of the problem is that many machines no longer have parallel
ports. So if the buyer really NEEDS the antiquated interface, they will
often buy a card that has a parallel port. These cards have PCI
interfaces and do not resemble the device found on the 1984 PC. If you
have a chip spec for this particular chip, you don’t need to ask us
because you already have the answer. All you need to do is ascertain
WHICH of the parallel-port interfaces you have. As I said earlier, while
there was one standard for the output side, there were several
mutually-incompatible standards for how input was handled. Twenty years
ago, I even knew the acronyms for these, but like most useless knowledge,
I have long since forgotten them.

So, RTFM.
joe

The difference is that my driver access the parallel port directly using
IO-Range address (READ/WRITE_PORT_UCHAR). 0x378 , 0x379 and 0x37a… It has
no dependency on parport.sys.

Its basically for virtualization product where I need to expose the raw
port to guest…

Now I want to expose the functionality of SetPortDirection to guest., thus
wondering how to achieve this…

 
Thanks
Anshul Makkar
www.justkernel.com


From: Gary Little
> To: Windows System Software Devs Interest List
> Sent: Wednesday, 21 March 2012 7:55 PM
> Subject: Re: [ntdev] Parallel port direction - from customized driver
>
>
> And there isn’t an existing IOCTL that changes the port direction? And of
> course your driver is supporting all the existing IOCTLs supported by the
> par port.sys? In other words, I couldn’t tell the difference between my
> system without your driver and your system with your driver?
>
> Why did you replace par port.sys?
>
>
>
> Gary Little
> H (952) 223-1349
> C (952) 454-4629
> xxxxx@comcast.net
>
>
>
> On Mar 21, 2012, at 9:13 AM, anshul makkar wrote:
>
> Hi ,
>>
>>
>>How to set the parallel port direction from user mode or kernel mode.
>>
>>Linux provides IOCTL to set the port direction. How can this be achieved
>> in Windows.
>>
>>
>>Note: Parport.sys is not in picture. It has been replaced by my
>> customized driver.
>>
>>
>>Thanks
>>Anshul Makkar
>>www.justkernel.com
>>
>>—
>>NTDEV is sponsored by OSR
>>
>>For our schedule of WDF, WDM, debugging and other seminars visit:
>>http://www.osr.com/seminars
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer