Re: Communication Driver Hooks

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: ZG (stopspam_zhigang_at_ybwork.com_nospam)
Date: 01/19/05


Date: Wed, 19 Jan 2005 21:00:45 +1100

If my memory is right, I remeber that there is a comm-hook sample in
VToolsD.

-- 
Regards,
ZG [@ Sydney]
Windows Driver Developer/Service
[Remove 'stopspam' & 'nospam' when you send email to me]
"Christopher Lansing" <c_lansing@hotmail.com> wrote in message 
news:OQJ8PdC$EHA.2104@TK2MSFTNGP14.phx.gbl...
>I am trying to do something which I am sure will haev many of you screaming 
>"You don't want to do that."  I want ot write what amounts to a bit bucket 
>for communication ports.  In particular I want to be able to plug it in 
>after the fact as a dynamically loaded driver, have all data written to an 
>arbitrary COM port or modem tossed in the bit bucket and the driver report 
>back that all data was successfully written.  The obvious approach to this 
>(to me) was to hook the _VCOMM_WriteComm service, set up number of 
>characters written and the return value appropriately, and never call the 
>real _VCOMM_WriteComm (very dangerous I'm sure).
>
> A small test program that opens COM1, writes a test string and reports 
> back the number of characters written fails to return from writing to the 
> COM port while my hook is installed.  I already know from other tests that 
> the hook is properly installed, and that the test program works.
>
> Is there more than just _VCOMM_WriteComm that needs to be hooked to do 
> this?  Is there a better or safer way to approach the bit bucket problem? 
> Any tips will be greatly appreciated.
>
> By the way, I'm just using the regular win 9x DDK without WDM (at least 
> for now, but that may change later).
>
> Thanks,
> Christopher Lansing 


Relevant Pages

  • Re: kernel 2.6.8 pwc patches and counterpatches
    ... > If you could get each and every author of SMP support to agree, ... Did I ever revoke the sisfb or my XFree86/X.org driver license? ... Hook or no hook. ... You provide a binary-only module which entirely replaces the mainline ...
    (Linux-Kernel)
  • Re: Cancel a printer job
    ... Or are you mentioning about api ... are you intending to write your own driver, ... one and not calling the next hook in the chain. ... If the user enters bad information or clicks Cancel, ...
    (microsoft.public.development.device.drivers)
  • Re: Cancel a printer job
    ... credentials (or to clear Joe's very valid point lets say I just want to pop ... I think I will have to some how hook in into the system or does ... are you intending to write your own driver, ... If the user enters bad information or clicks Cancel, ...
    (microsoft.public.development.device.drivers)
  • Summarizing the PWC driver questions/answers
    ... And here's Linus's response after I removed the driver, ... Why did you remove the hook from the pwc driver? ... But you took away my freedom! ... Isn't Linux about freedom? ...
    (Linux-Kernel)
  • Re: Import Address Table of .SYS driver
    ... Even if you hook the driver entry points, ... > I wish to hook into the upper and lower edge of a network miniport driver ...
    (microsoft.public.development.device.drivers)