For what it is worth (and perhaps not much) an NDIS Miniport that wishes to
gain access to registry information using the NdisXxxConfiguration() APIs
and specifically to keys under the
HKEY_LOCAL_MACHINE\SystemCurrentControlSet\Services key can use
NdisOpenProtocolConfiguration().
The last argument to NdisOpenProtocolConfiguration(), ProtocolSection, is
simply an NDIS_STRING (UNICODE_STRING) of the registry subkey path *below*
HKLM.…\Services.
While using the ZwXxxx() routines is always good fun or using the Rtlxxxx()
helpers for reading the registry is also good fun, sometimes us NDIS
curmudgeons like to just use NDIS DDIs uniformly for global, per-adapter,
and per-binding configuration access.
NdisOpenProtocolConfiguration() is pretty easy to ‘tame’ into opening your
driver Parameters key.
NDIS_STATUS status;
NDIS_HANDLE paramCfg;
NDIS_STRING paramCfgName = NDIS_STRING_CONST(“passthru\Parameters”);
NdisOpenProtocolConfiguration(&status, ¶mCfg, ¶mCfgName);
…
NdisCloseConfiguration(parmCfg);
Good Luck,
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of igor.sharovar@hp.com
Sent: Thursday, September 10, 2009 11:05 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Readings datas from the config files in IM driver
would it be posible to get any reference to creat e above method.
You could look sample in WinDDK..\src\network\ndis\passthru\driver. It is a
sample of IM NDIS driver.
Look at netsf.inf file. The section [Passthru.AddReg] adds Param1 into
existing Registry Key Parameters. The DriverEntry of your driver has a
parameters, called RegistryPath, which contains a path to your driver
Registry settings. Using this path you could call ZwXXXX functions to get
information from driver Registry settings.
Igor Sharovar
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