Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Virtul port - design ideas

Reply
Thread Tools Display Modes

Virtul port - design ideas

 
 
Ivco
Guest
Posts: n/a

 
      10-23-2009
Hi everyone,

We have the classical example of an old application that uses parallel port
to talk to a device connected to the parallel port, the application cannot
be changed but the interface of the device evolved to USB.

Now, there is already implemented a proprietary WDM USB function driver to
talk to the USB device. The idea is to create a virtual parallel port which
will be used by the application.

What should be the right design for that virtual port driver?
I was thinking about two possible cases:
1. Modify the existing proprietary USB driver by adding "virtual port
functionality"
2. Possibly use a filter driver that implements "virtual port
functionality" - not sure if that is going to work

How would you approach this kind of problem?

Thank you for your time


 
Reply With Quote
 
 
 
 
Brian Catlin [MVP]
Guest
Posts: n/a

 
      10-27-2009
The easiest approach would be to figure out which I/O requests (READ, WRITE,
IOCTLS) the application send to the parallel port, and then implement those
in your driver. If the application searches for devices by their GUID
(unlikely, given how old I suspect the app is) then the driver will need to
register that GUID.



"Ivco" <> wrote in message
news:eAreGf$...
> Hi everyone,
>
> We have the classical example of an old application that uses parallel
> port to talk to a device connected to the parallel port, the application
> cannot be changed but the interface of the device evolved to USB.
>
> Now, there is already implemented a proprietary WDM USB function driver to
> talk to the USB device. The idea is to create a virtual parallel port
> which will be used by the application.
>
> What should be the right design for that virtual port driver?
> I was thinking about two possible cases:
> 1. Modify the existing proprietary USB driver by adding "virtual port
> functionality"
> 2. Possibly use a filter driver that implements "virtual port
> functionality" - not sure if that is going to work
>
> How would you approach this kind of problem?
>
> Thank you for your time
>

 
Reply With Quote
 
Ivco
Guest
Posts: n/a

 
      10-27-2009
Thanks for your response

> If the application searches for devices by their GUID...

What do you mean by this? The application calls CreateFile, ReadFile,
WriteFile and IOCTLs.

My qustion is if it is possible to handle the virtual
ports(creation/deltion) in a filter driver since there is already a function
driver that handles the USB communication.

Thanks


 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      10-27-2009
>> If the application searches for devices by their GUID...
> What do you mean by this?


PnP device interfaces and SetupDiGetDeviceInterfaceDetail

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      10-28-2009
"Ivco" <> wrote:
>
>We have the classical example of an old application that uses parallel port
>to talk to a device connected to the parallel port, the application cannot
>be changed but the interface of the device evolved to USB.
>
>Now, there is already implemented a proprietary WDM USB function driver to
>talk to the USB device. The idea is to create a virtual parallel port which
>will be used by the application.
>
>What should be the right design for that virtual port driver?
>I was thinking about two possible cases:
>1. Modify the existing proprietary USB driver by adding "virtual port
>functionality"
>2. Possibly use a filter driver that implements "virtual port
>functionality" - not sure if that is going to work
>
>How would you approach this kind of problem?


The word "port" is overloaded. Are you talking literally about "virtual
I/O ports", in the sense that your application actually uses I/O port
instructions? If so, then your task is completely hopeless. You'll need
to rewrite the application.

If the old application uses ReadFile, WriteFile, and DeviceIoControl to
talk to the parallel port, then your task is not all that difficult.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Ivco
Guest
Posts: n/a

 
      10-29-2009
Thank you all for your comments!

The application uses ReadFile, WriteFile, and DeviceIoControl to access the
parallel port. It does not use anything like IN/OUT to access IO ports
directly.

First I am going to look into the toaster filter example to figure out the
filter design part and then expand with creation and deletion of virtual
ports when new USB device is plugged in or plugged out.

Where should I look for an example of how to create virtual ports?

Thanks


 
Reply With Quote
 
Brian Catlin [MVP]
Guest
Posts: n/a

 
      10-29-2009

"Chris" <> wrote in message
news:416a5f70-8921-4b07-ae77-...
> On Oct 28, 1:21 am, Tim Roberts <t...@probo.com> wrote:
>
>> The word "port" is overloaded. Are you talking literally about "virtual
>> I/O ports", in the sense that your application actually uses I/O port
>> instructions? If so, then your task is completely hopeless. You'll need
>> to rewrite the application.

>
> I thought there were "hooks" into 0x03F8, etc. for DOS compatibility?


That is for "virtual device drivers", which are not really drivers (just
user-mode DLLs) and are designed for supporting 16-bit apps. Virtual device
drivers are poorly documented, very slow, and unsupported on 64-bit systems.

-Brian

Brian Catlin, Azius Developer Training, 888-238-4050 x4
Windows device driver training and consulting
See www.azius.com for a list of classes



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot install Vista ACPI error Salsakidd Windows Vista Installation 6 10-10-2007 10:12 AM
Ideas about port configuration? Bill Starbuck Windows Vista Hardware 0 08-28-2007 12:39 PM
USB port Scott Windows Vista Hardware 0 06-19-2007 03:34 AM
Re: Dlink 624 & utorrent bittorrent slow downloads, no port open help! Sean Major Windows Vista Hardware 0 12-16-2006 01:52 AM
Stop Error 0x0000007b Louis LeBrun Windows Vista Installation 17 07-05-2006 09:00 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59