473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Filter Driver in VB.Net?

I want to intercept operations on serial ports (much like PortMon from
SysInternals), and I think I need a filter driver. Is that correct, and can
one be written in VB.NET?

If it is possible, can anyone point me to a reference? I have been hunting
around, and have found lots about the principal of filter drivers, but so
far nothing with a practical example.

Of course, if there is another/better way I would be interested to hear it.
The key thing is that the application needs to monitor two-way traffic on a
serial port, so it must not prevent normal opening and closing of the port
by another application.

TIA

Charles
Nov 21 '05 #1
2 1785

Charles Law wrote:
I want to intercept operations on serial ports (much like PortMon from SysInternals), and I think I need a filter driver. Is that correct, and can one be written in VB.NET?

If it is possible, can anyone point me to a reference? I have been hunting around, and have found lots about the principal of filter drivers, but so far nothing with a practical example.

Of course, if there is another/better way I would be interested to hear it. The key thing is that the application needs to monitor two-way traffic on a serial port, so it must not prevent normal opening and closing of the port by another application.


All I could find on this topic was an article from the October 2002
MSDN magazine, which detailed how to wrap P/Invoke'd API calls inside a
friendly .net class. This was for plain reading / writing to serial
ports. Also the 'My' namespace in Whidbey will include
My.Computer.Ports to make that task a lot easier.

None of this is much help to you unfortunately... except to suggest
that you will almost certainly have to use P/Invoke and the original
Win32 APIs to do this, rather than there being some framework to help
you.

The article I mentioned might be of use in explaining some P/Invoke
issues, the URL is

<http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/>

--
Larry Lard
Replies to group please

Nov 21 '05 #2
Hi Larry

Thanks for the reply. The article you mention I have seen; it helped me
resolve an issue with the serial code on Corrado Cavalli's site. I can also
report that the code would open a port exclusively, thereby preventing the
application to be monitored from opening the port.

My mention of filter drivers is based on the information at SysInternals,
where they talk about using ZwCreateFile, for example, but so far I cannot
even get ZwCreateFile to work, so I am a bit stuck.

Charles
"Larry Lard" <la*******@hotmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...

Charles Law wrote:
I want to intercept operations on serial ports (much like PortMon

from
SysInternals), and I think I need a filter driver. Is that correct,

and can
one be written in VB.NET?

If it is possible, can anyone point me to a reference? I have been

hunting
around, and have found lots about the principal of filter drivers,

but so
far nothing with a practical example.

Of course, if there is another/better way I would be interested to

hear it.
The key thing is that the application needs to monitor two-way

traffic on a
serial port, so it must not prevent normal opening and closing of the

port
by another application.


All I could find on this topic was an article from the October 2002
MSDN magazine, which detailed how to wrap P/Invoke'd API calls inside a
friendly .net class. This was for plain reading / writing to serial
ports. Also the 'My' namespace in Whidbey will include
My.Computer.Ports to make that task a lot easier.

None of this is much help to you unfortunately... except to suggest
that you will almost certainly have to use P/Invoke and the original
Win32 APIs to do this, rather than there being some framework to help
you.

The article I mentioned might be of use in explaining some P/Invoke
issues, the URL is

<http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/>

--
Larry Lard
Replies to group please

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rob | last post by:
In Python 2.3, this code still prints a warning (when run as a script, not from the interpreter). How do I get rid of the warning? I'd like to do it without passing command line args to python. ...
8
by: noe | last post by:
Hello all devs!! I’m a student and I’m developing my Final Project in the University. I have to develop a driver for Windows XP that work so: I have a file in the HD (NTFS file system) of my PC...
2
by: hugomind | last post by:
Hi, I've downloaded den Microsoft DDK 3790.1830 and there is an example under 3790.1830\src\storage\filters\diskperf I've compiled this one and would like to know where I could find the...
2
by: ricovox | last post by:
Hi, Does anyone have experience with NDIS drivers? I need to either write or find an NDIS driver that will allow my user-mode application to selectively DROP packets before they hit the TCP/IP...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.