Steps for an application to query a driver's version

polaris

Distinguished
Apr 29, 2001
63
0
18,630
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

Hi:

I'm new to driver development, just wonder what should be the steps to
implement this: On WinXP, a Windows application needs to query the version
of a running driver (a network device driver). What are the steps to
implement in the drver side (IOCTL?) and what needs to be done in the
application side? Just roughly steps should be good enough for me to start.

Thanks in Advance !
Polaris
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

In order to get the driver version from an already started (running)
network interface card (NIC) driver, query its
OID_GEN_VENDOR_DRIVER_VERSION. This can be done in several ways, e.g.
via IOCTL or WMI, see

http://www.ndis.com/faq/QA10290101.htm

http://msdn.microsoft.com/library/
-> "Win32 and COM Development"
-> "Driver Development Kit"
-> "Network Devices and Protocols"

>From here see both:

-> "Design Guide"
-> "Miniport Drivers"
-> "Obtaining and Setting Miniport Driver Information and NDIS
Support for WMI"
-> "NDIS Support for WMI"

...and:

-> "Reference"
-> "NDIS Objects"
-> "General Objects"
-> "General Operational Characteristics"
-> "OID_GEN_VENDOR_DRIVER_VERSION"

Stephan
---
Polaris wrote:
> Hi:
>
> I'm new to driver development, just wonder what should be the steps to
> implement this: On WinXP, a Windows application needs to query the version
> of a running driver (a network device driver). What are the steps to
> implement in the drver side (IOCTL?) and what needs to be done in the
> application side? Just roughly steps should be good enough for me to start.
>
> Thanks in Advance !
> Polaris
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

Polaris wrote:

> Hi:
>
> I'm new to driver development, just wonder what should be the steps to
> implement this: On WinXP, a Windows application needs to query the version
> of a running driver (a network device driver). What are the steps to
> implement in the drver side (IOCTL?) and what needs to be done in the
> application side? Just roughly steps should be good enough for me to start.
>
> Thanks in Advance !
> Polaris

A WDM driver is simply a kernel DLL. Read the version information of the
driver just as you would do it for a user space DLL.
 

polaris

Distinguished
Apr 29, 2001
63
0
18,630
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

but how can a user mode application directly "talk" with kernel mode .sys
driver ?

"Robert Marquardt" <marquardt@codemercs.com> wrote in message
news:%23S3JLaQtFHA.236@TK2MSFTNGP11.phx.gbl...
> Polaris wrote:
>
>> Hi:
>>
>> I'm new to driver development, just wonder what should be the steps to
>> implement this: On WinXP, a Windows application needs to query the
>> version of a running driver (a network device driver). What are the steps
>> to implement in the drver side (IOCTL?) and what needs to be done in the
>> application side? Just roughly steps should be good enough for me to
>> start.
>>
>> Thanks in Advance !
>> Polaris
>
> A WDM driver is simply a kernel DLL. Read the version information of the
> driver just as you would do it for a user space DLL.
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

You don't have to "talk" to the driver. Look at the GetFileVersionInfo,
GetFileVersionInfoSize and VerQueryValue functions in the Win32 SDK.

Soumik.


On Thu, 08 Sep 2005 23:28:35 -0700, Polaris <etpolaris@hotmail.com> wrote:

> but how can a user mode application directly "talk" with kernel mode .sys
> driver ?
>
> "Robert Marquardt" <marquardt@codemercs.com> wrote in message
> news:%23S3JLaQtFHA.236@TK2MSFTNGP11.phx.gbl...
>> Polaris wrote:
>>
>>> Hi:
>>>
>>> I'm new to driver development, just wonder what should be the steps to
>>> implement this: On WinXP, a Windows application needs to query the
>>> version of a running driver (a network device driver). What are the
>>> steps
>>> to implement in the drver side (IOCTL?) and what needs to be done in
>>> the
>>> application side? Just roughly steps should be good enough for me to
>>> start.
>>>
>>> Thanks in Advance !
>>> Polaris
>>
>> A WDM driver is simply a kernel DLL. Read the version information of the
>> driver just as you would do it for a user space DLL.
>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
 

polaris

Distinguished
Apr 29, 2001
63
0
18,630
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

I think that does not guarantee to get the version of the running (loaded)
driver.

"Soumik Sarkar" <soumikUNDERSCOREsarkarATyahooDOTcom> wrote in message
news:eek:p.swuybhkpiee6hd@soumik-shuttle.zonelabs.com...
> You don't have to "talk" to the driver. Look at the GetFileVersionInfo,
> GetFileVersionInfoSize and VerQueryValue functions in the Win32 SDK.
>
> Soumik.
>
>
> On Thu, 08 Sep 2005 23:28:35 -0700, Polaris <etpolaris@hotmail.com> wrote:
>
>> but how can a user mode application directly "talk" with kernel mode .sys
>> driver ?
>>
>> "Robert Marquardt" <marquardt@codemercs.com> wrote in message
>> news:%23S3JLaQtFHA.236@TK2MSFTNGP11.phx.gbl...
>>> Polaris wrote:
>>>
>>>> Hi:
>>>>
>>>> I'm new to driver development, just wonder what should be the steps to
>>>> implement this: On WinXP, a Windows application needs to query the
>>>> version of a running driver (a network device driver). What are the
>>>> steps
>>>> to implement in the drver side (IOCTL?) and what needs to be done in
>>>> the
>>>> application side? Just roughly steps should be good enough for me to
>>>> start.
>>>>
>>>> Thanks in Advance !
>>>> Polaris
>>>
>>> A WDM driver is simply a kernel DLL. Read the version information of the
>>> driver just as you would do it for a user space DLL.
>>
>>
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
 

polaris

Distinguished
Apr 29, 2001
63
0
18,630
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

Thanks Mr. Wolf!
Polaris
"Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message
news:1126258209.175247.192430@g43g2000cwa.googlegroups.com...
> In order to get the driver version from an already started (running)
> network interface card (NIC) driver, query its
> OID_GEN_VENDOR_DRIVER_VERSION. This can be done in several ways, e.g.
> via IOCTL or WMI, see
>
> http://www.ndis.com/faq/QA10290101.htm
>
> http://msdn.microsoft.com/library/
> -> "Win32 and COM Development"
> -> "Driver Development Kit"
> -> "Network Devices and Protocols"
>
>>From here see both:
>
> -> "Design Guide"
> -> "Miniport Drivers"
> -> "Obtaining and Setting Miniport Driver Information and NDIS
> Support for WMI"
> -> "NDIS Support for WMI"
>
> ..and:
>
> -> "Reference"
> -> "NDIS Objects"
> -> "General Objects"
> -> "General Operational Characteristics"
> -> "OID_GEN_VENDOR_DRIVER_VERSION"
>
> Stephan
> ---
> Polaris wrote:
>> Hi:
>>
>> I'm new to driver development, just wonder what should be the steps to
>> implement this: On WinXP, a Windows application needs to query the
>> version
>> of a running driver (a network device driver). What are the steps to
>> implement in the drver side (IOCTL?) and what needs to be done in the
>> application side? Just roughly steps should be good enough for me to
>> start.
>>
>> Thanks in Advance !
>> Polaris
>
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.windowsxp.device_driver.dev (More info?)

Polaris wrote:
> I think that does not guarantee to get the version of the running (loaded)
> driver.

No, but neither does any method you can possibly use. Filters can be
injected on anything, the OS can be hooked, the driver itself can be
arbitrarily edited by malicious code to produce a different answer,
etc., etc.

If you look up the image path in the services key and then check the
version info on that file, you're close to as good as you can get, but
with a lot less effort.
--
.../ray\..
 

TRENDING THREADS