Is there a way to determine which driver is using the COM port ?
I’m trying to access the serial driver but i can’t ?
I know it’s a driver that use the COM port but i don’t know which one.
That PC don’t have debugging software installed.Can i use a software to get
that information ?
Thanks.
How do you know it is a driver that has access to the com port? How do you
know it is not an application? Is this the target with the debugger
enabled on the Boot.ini line, and is the host connected to the target?
The personal opinion of
Gary G. Little
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Francky
Sent: Wednesday, November 30, 2005 1:43 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Which driver is using the COM port
Is there a way to determine which driver is using the COM port ?
I’m trying to access the serial driver but i can’t ?
I know it’s a driver that use the COM port but i don’t know which one.
That PC don’t have debugging software installed.Can i use a software to
get
that information ?
Thanks.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
From Process Explorer we can see when an application is using the COM port.
The problem occur only sometime when i connect my modem 1x.
This modem is able to use USB and Serial. I’m using that modem with the USB
only and everything is working fine when i connect. I just want to know if i
can validate if the driver is still trying to access the COM port.
The debugger is not configure in the boot.ini.
“Francky” wrote in message news:xxxxx@ntdev…
> Is there a way to determine which driver is using the COM port ?
> I’m trying to access the serial driver but i can’t ?
> I know it’s a driver that use the COM port but i don’t know which one.
> That PC don’t have debugging software installed.Can i use a software to
get
> that information ?
>
> Thanks.
>
>
>
Well, if the driver is actually attached to the serial device stack as a
function driver for some serenum enumerated device (reasonably
typical), you can use OSR’s DeviceTree program to walk the whole device
tree and see all the drivers in the stack.
Not sure there’s any trivial application-based way to do that with
drivers that just CreateFile the serial port, though… (obviously if
you had a debugger attached you could just break on the IRP_MJ_CREATE
dispatch routine and look at the stack).
Francky wrote:
Is there a way to determine which driver is using the COM port ?
I’m trying to access the serial driver but i can’t ?
I know it’s a driver that use the COM port but i don’t know which one.
That PC don’t have debugging software installed.Can i use a software to get
that information ?
Thanks.
–
Ray
But to debug the IRP_MJ_CREATE dispatch routine and validate the stack i
need to compile and debug the serial driver ?
“Ray Trent” wrote in message
news:xxxxx@ntdev…
> Well, if the driver is actually attached to the serial device stack as a
> function driver for some serenum enumerated device (reasonably
> typical), you can use OSR’s DeviceTree program to walk the whole device
> tree and see all the drivers in the stack.
>
> Not sure there’s any trivial application-based way to do that with
> drivers that just CreateFile the serial port, though… (obviously if
> you had a debugger attached you could just break on the IRP_MJ_CREATE
> dispatch routine and look at the stack).
>
> Francky wrote:
> > Is there a way to determine which driver is using the COM port ?
> > I’m trying to access the serial driver but i can’t ?
> > I know it’s a driver that use the COM port but i don’t know which one.
> > That PC don’t have debugging software installed.Can i use a software to
get
> > that information ?
> >
> > Thanks.
> >
> >
> >
>
> –
> Ray
>
No, you just need the symbols for the serial driver, which are freely
available. Depending on how clever you think you are, you might need to
look at the source to determine what the name of the function is.
Francky wrote:
But to debug the IRP_MJ_CREATE dispatch routine and validate the stack i
need to compile and debug the serial driver ?
“Ray Trent” wrote in message
> news:xxxxx@ntdev…
>> Well, if the driver is actually attached to the serial device stack as a
>> function driver for some serenum enumerated device (reasonably
>> typical), you can use OSR’s DeviceTree program to walk the whole device
>> tree and see all the drivers in the stack.
>>
>> Not sure there’s any trivial application-based way to do that with
>> drivers that just CreateFile the serial port, though… (obviously if
>> you had a debugger attached you could just break on the IRP_MJ_CREATE
>> dispatch routine and look at the stack).
>>
>> Francky wrote:
>>> Is there a way to determine which driver is using the COM port ?
>>> I’m trying to access the serial driver but i can’t ?
>>> I know it’s a driver that use the COM port but i don’t know which one.
>>> That PC don’t have debugging software installed.Can i use a software to
> get
>>> that information ?
>>>
>>> Thanks.
>>>
>>>
>>>
>> –
>> Ray
>>
>
>
>
–
Ray
!drvobj will also dump it out for you. Use the public symbol server and
will be able to see serial’s entry points. from my debugger (the 3 is
the important part here, w/out it , the dispatch table is not dumped)
0: kd> !drvobj serial 3
Driver object (82154278) is for:
Loading symbols for f85b7000 serial.sys -> serial.sys
\Driver\Serial
Driver Extension List: (id , addr)
Device Object list:
82153140
DriverEntry: f85c203b serial!GsDriverEntry
DriverStartIo: 00000000
DriverUnload: f85bdadc serial!SerialUnload
Dispatch routines:
[00] IRP_MJ_CREATE f85bae3e
serial!SerialCreateOpen
[01] IRP_MJ_CREATE_NAMED_PIPE 804fcab1
nt!IopInvalidDeviceRequest
[02] IRP_MJ_CLOSE f85be89f
serial!SerialClose
[03] IRP_MJ_READ f85bf7e5
serial!SerialRead
[04] IRP_MJ_WRITE f85c1c96
serial!SerialWrite
[05] IRP_MJ_QUERY_INFORMATION f85bdcad
serial!SerialQueryInformationFile
[06] IRP_MJ_SET_INFORMATION f85bdd6d
serial!SerialSetInformationFile
[07] IRP_MJ_QUERY_EA 804fcab1
nt!IopInvalidDeviceRequest
[08] IRP_MJ_SET_EA 804fcab1
nt!IopInvalidDeviceRequest
[09] IRP_MJ_FLUSH_BUFFERS f85bda65
serial!SerialFlush
[0a] IRP_MJ_QUERY_VOLUME_INFORMATION 804fcab1
nt!IopInvalidDeviceRequest
[0b] IRP_MJ_SET_VOLUME_INFORMATION 804fcab1
nt!IopInvalidDeviceRequest
[0c] IRP_MJ_DIRECTORY_CONTROL 804fcab1
nt!IopInvalidDeviceRequest
[0d] IRP_MJ_FILE_SYSTEM_CONTROL 804fcab1
nt!IopInvalidDeviceRequest
[0e] IRP_MJ_DEVICE_CONTROL f85beb20
serial!SerialIoControl
[0f] IRP_MJ_INTERNAL_DEVICE_CONTROL f85be6a8
serial!SerialInternalIoControl
[10] IRP_MJ_SHUTDOWN 804fcab1
nt!IopInvalidDeviceRequest
[11] IRP_MJ_LOCK_CONTROL 804fcab1
nt!IopInvalidDeviceRequest
[12] IRP_MJ_CLEANUP f85be850
serial!SerialCleanup
[13] IRP_MJ_CREATE_MAILSLOT 804fcab1
nt!IopInvalidDeviceRequest
[14] IRP_MJ_QUERY_SECURITY 804fcab1
nt!IopInvalidDeviceRequest
[15] IRP_MJ_SET_SECURITY 804fcab1
nt!IopInvalidDeviceRequest
[16] IRP_MJ_POWER f85bac37
serial!SerialPowerDispatch
[17] IRP_MJ_SYSTEM_CONTROL f85bb385
serial!SerialSystemControlDispatch
[18] IRP_MJ_DEVICE_CHANGE 804fcab1
nt!IopInvalidDeviceRequest
[19] IRP_MJ_QUERY_QUOTA 804fcab1
nt!IopInvalidDeviceRequest
[1a] IRP_MJ_SET_QUOTA 804fcab1
nt!IopInvalidDeviceRequest
[1b] IRP_MJ_PNP f85bab7d
serial!SerialPnpDispatch
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ray Trent
Sent: Wednesday, November 30, 2005 1:30 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Which driver is using the COM port
No, you just need the symbols for the serial driver, which are freely
available. Depending on how clever you think you are, you might need to
look at the source to determine what the name of the function is.
Francky wrote:
But to debug the IRP_MJ_CREATE dispatch routine and validate the
stack i
need to compile and debug the serial driver ?
“Ray Trent” wrote in message
> news:xxxxx@ntdev…
>> Well, if the driver is actually attached to the serial device stack
as a
>> function driver for some serenum enumerated device (reasonably
>> typical), you can use OSR’s DeviceTree program to walk the whole
device
>> tree and see all the drivers in the stack.
>>
>> Not sure there’s any trivial application-based way to do that with
>> drivers that just CreateFile the serial port, though… (obviously if
>> you had a debugger attached you could just break on the IRP_MJ_CREATE
>> dispatch routine and look at the stack).
>>
>> Francky wrote:
>>> Is there a way to determine which driver is using the COM port ?
>>> I’m trying to access the serial driver but i can’t ?
>>> I know it’s a driver that use the COM port but i don’t know which
one.
>>> That PC don’t have debugging software installed.Can i use a software
to
> get
>>> that information ?
>>>
>>> Thanks.
>>>
>>>
>>>
>> –
>> Ray
>>
>
>
>
–
Ray
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com