inf AddReg sections and notifications

Hi,

How can a miniport receive notification that a registry setting for a
miniport has changed.

IOW (and pardon the probably wrong terminology), I’ve seen some INF
files with AddReg sections that show up as an “Advanced” tab via device
manager. If I change a setting, how does the driver get notification
that its registry setting changed?

Thx
-PWM

I think you must write a companion “notify object” to create the glue.
Search the WDK for “notify object”.

I believe that the WDK “mux” sample includes a notify object…

Good luck,

Thomas F. Divine


From: “Peter W. Morreale”
Sent: Monday, March 22, 2010 8:51 AM
To: “Windows System Software Devs Interest List”
Subject: [ntdev] inf AddReg sections and notifications

>
> Hi,
>
> How can a miniport receive notification that a registry setting for a
> miniport has changed.
>
> IOW (and pardon the probably wrong terminology), I’ve seen some INF
> files with AddReg sections that show up as an “Advanced” tab via device
> manager. If I change a setting, how does the driver get notification
> that its registry setting changed?
>
> Thx
> -PWM
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Here’s my understanding of how this works. I did not write the Notify Object (NO) but did write the driver. The NO sets its capabilities to receive notifications. When the NO gets a ‘reconfigure’ notification it places its new structure in the notification and return it. The driver will receive in its PnPHandler a NetEventReconfigure in NetPnPEvent.NetEvent.

Larry C

While Larry’s & Thomas’ comments about a ‘notify object’ are a great strategy for NetService (or protocol or client) component in the NDI family, a Net class device (aka, a Miniport for a NIC) would expose additional UI either with the help of the generic Net Class installer support (declarative in the INF) or perhaps even the WMI property facility for PnP device (not sure about that one) or a custom Device CoInstaller providing UI.

The answer to your inquiry about how the driver gets notified is that the device usually gets restarted (so in NDIS Miniport, you see a MiniportHalt() followed by a MinipartInitialize()). Getting an ‘operational’ update while running is something you would typically need to write for yourself (Device CoInstaller + WMI mapped custom OIDs).

The section in the WDK docs titled “Specifying Configuration Parameters for the Advanced Properties Page” http://msdn.microsoft.com/en-us/library/aa937939.aspx would be a great starting point for the ‘easy’ cases. From there (custom UI) gets a bit more murky and open-ended with the sections on Device CoInstaller UI.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter W. Morreale
Sent: Monday, March 22, 2010 8:51 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] inf AddReg sections and notifications

Hi,

How can a miniport receive notification that a registry setting for a
miniport has changed.

IOW (and pardon the probably wrong terminology), I’ve seen some INF
files with AddReg sections that show up as an “Advanced” tab via device
manager. If I change a setting, how does the driver get notification
that its registry setting changed?

Thx
-PWM


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

On Mon, 2010-03-22 at 19:04 -0400, David R. Cattley wrote:

While Larry’s & Thomas’ comments about a ‘notify object’ are a great strategy for NetService (or protocol or client) component in the NDI family, a Net class device (aka, a Miniport for a NIC) would expose additional UI either with the help of the generic Net Class installer support (declarative in the INF) or perhaps even the WMI property facility for PnP device (not sure about that one) or a custom Device CoInstaller providing UI.

The answer to your inquiry about how the driver gets notified is that the device usually gets restarted (so in NDIS Miniport, you see a MiniportHalt() followed by a MinipartInitialize()). Getting an ‘operational’ update while running is something you would typically need to write for yourself (Device CoInstaller + WMI mapped custom OIDs).

The section in the WDK docs titled “Specifying Configuration Parameters for the Advanced Properties Page” http://msdn.microsoft.com/en-us/library/aa937939.aspx would be a great starting point for the ‘easy’ cases. From there (custom UI) gets a bit more murky and open-ended with the sections on Device CoInstaller UI.

Good Luck,
Dave Cattley

nod. And Thanks David, Thomas and Larry.

For the time being I’m happy with a ‘manual’ method, but will bear in
mind for the future should it be warranted. At the moment I’m not even
parsing the registry during init (falling back on hardwired defaults),
but I figured I’d ask so as know all the tools available when and if I
get there.

Right now I’m still fighting checksum offload… sooo close it
hurts… :wink:

Best,
-PWM

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter W. Morreale
Sent: Monday, March 22, 2010 8:51 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] inf AddReg sections and notifications

Hi,

How can a miniport receive notification that a registry setting for a
miniport has changed.

IOW (and pardon the probably wrong terminology), I’ve seen some INF
files with AddReg sections that show up as an “Advanced” tab via device
manager. If I change a setting, how does the driver get notification
that its registry setting changed?

Thx
-PWM


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer