On Jan 17, 2007, at 3:31 AM, Phil Jollans wrote:
I have now found some information, in particular at
http://www.ndis.com/faq/QA10290101.htm
First a quick question to the technique using DeviceIOControl. The
article
indicates that my driver would have to use NdisMRegisterDevice. My
driver
already calls NdisMRegisterMiniport. Is there any conflict between
these two
calls?
Nope.
However, implementing DeviceIOControl would add significant code to
the
driver, which I would prefer not to do.
You’re going to have to add control code somewhere; the code
shouldn’t be too complex unless you want to do something complex. If
you’re just getting and setting variables or something, it’s very
straightforward.
The better approach seems to be with custom OIDs and WMI. This would
probably require no structural change to the driver and appears to
be a
clean solution.
I don’t personally see anything wrong with the control device
approach, as long as you’re careful.
Does anybody have a good sample of how to do this? In particular, I
would
like a sample of how to access OIDs using WMI.
I don’t really care what language it is in, but one of VB,
VBScript, C++, C#
or Java would be most useful.
Forgive me if I missed something earlier in this thread, but you’re
aware, are you not, that kernel drivers must be in C (or a restricted
C++ if you know what you’re doing)? Or are you just referring to the
usermode client?
Incidentally, netvmini and passthru have control device sample code.
There is a device object reference counting issue that you need to be
careful of, though; see:
http:lifetimes/>
HTH.
-sd</http:>