Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

is there a way to write a Null Driver to be in the net class?

36 views
Skip to first unread message

eti...@gmail.com

unread,
Dec 12, 2005, 4:41:26 AM12/12/05
to
i've written and inf file for a null driver and i can make it be in the
Unknown class and the System class. can I put it in the Net class?

thank you

Pavel A.

unread,
Dec 12, 2005, 6:35:02 AM12/12/05
to
"eti...@gmail.com" wrote:
> i've written and inf file for a null driver and i can make it be in the
> Unknown class and the System class. can I put it in the Net class?

No. Net class is for netcards (unless you make a "dummy" ndis driver).

--PA

eti...@gmail.com

unread,
Dec 12, 2005, 7:21:42 AM12/12/05
to

yes, that is what i want. is it possible?

eti...@gmail.com

unread,
Dec 12, 2005, 7:21:48 AM12/12/05
to

yes, that is what i want. is it possible?

Eliyas Yakub [MSFT]

unread,
Dec 12, 2005, 10:57:20 AM12/12/05
to
So you want to fake a network device on the system. Anything gets written to
the device goes down the drain and nothing gets indicated from the device to
the protocol. Right? Why do you want to do that? If you tell us the purpose,
we might be able to suggest a better solution than writing a driver.

Take a look at the src\network\ndis\netvmini sample in the Server 2003 SP1
DDK. It has all you need. You just have to rip some code from the send &
receive handler to make one such driver.
--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx


eti...@gmail.com

unread,
Dec 12, 2005, 11:52:04 AM12/12/05
to
what i'm trying to do is write a driver that will prevent a user from
using a specific NIC. when that NIC will be inserted I will install my
Null Driver (same HWID) and it will start disabled. that is why i want
it to be under the net class.

is that possible? it is not for a product. just something i'm trying to
do.

thank you

Doron Holan [MS]

unread,
Dec 12, 2005, 1:37:21 PM12/12/05
to
that should be possible. the null driver doesn't know anything about
classes and can be installed under any device class.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.


This posting is provided "AS IS" with no warranties, and confers no rights.


<eti...@gmail.com> wrote in message
news:1134406324.3...@z14g2000cwz.googlegroups.com...

Pavel A.

unread,
Dec 12, 2005, 2:00:02 PM12/12/05
to
"Doron Holan [MS]" wrote:
> that should be possible. the null driver doesn't know anything about
> classes and can be installed under any device class.

But what is the point to make it Net class?
This driver won't start (because it is disabled), and won't register with
NDIS.
A connection for this device won't be created anyway.

--PA

Doron Holan [MS]

unread,
Dec 12, 2005, 3:03:04 PM12/12/05
to
that's true, but if the user wants to find the device to instlal the right
driver (via device manager let's say), putting it into the net class makes
it easier to find. the user will not know to look under system devices to
find the device if the class were not NET.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Pavel A." <pav...@NOwritemeNO.com> wrote in message
news:6B5A5650-7DD9-4C81...@microsoft.com...

Eliyas Yakub [MSFT]

unread,
Dec 12, 2005, 3:29:13 PM12/12/05
to
Here is a sample NULL INF. Change the Class name, GUID, pnp-id etc to match
net class and your device. You can avoid installing a driver for your device
with a NULL INF but it still wouldn't prevent the "Found New Hardware"
dialog to popup until you get this INF signed.

[Version]
Signature="$WINDOWS NT$"
Class=ROASTER
ClassGuid={cc82335f-fb0d-4544-a91a-7dc9a7c6e8c3}


; ================= Class section =====================


[ClassInstall32]
Addreg=RoasterClassReg


[RoasterClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-5


;*****************************************
; Roaster Device Install Section
;*****************************************


[Manufacturer]
%StdMfg%=Standard


[Standard]
; DisplayName Section DeviceId
; ----------- ------- --------
%RoasterDevice.DeviceDesc%=Roaster_Device, Roaster\MsRoaster


[Roaster_Device.NT]
;


;-------------- Service installation


[Roaster_Device.NT.Services]
AddService = , %SPSVCINST_ASSOCSERVICE%,


[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
MSFT = "Microsoft"
StdMfg = "(Standard system devices)"
ClassName = "Roaster"
RoasterDevice.DeviceDesc = "Microsoft Roaster"

--
-Eliyas


This posting is provided "AS IS" with no warranties, and confers no rights.

http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx


eti...@gmail.com

unread,
Dec 13, 2005, 2:47:49 AM12/13/05
to
thanks for the help. When i use the inf file you've suggested (and
added the HWID) everythnig works, but when i just change the class and
ClassGuid to Net i get an error: "An error occurred during the
installation of the device". The required line was was not found in the
INF".
another question, how do make the driver to start disabled?

thank you very much

Pavel A.

unread,
Dec 13, 2005, 6:27:02 AM12/13/05
to
"eti...@gmail.com" wrote:
> thanks for the help. When i use the inf file you've suggested (and
> added the HWID) everythnig works, but when i just change the class and
> ClassGuid to Net i get an error: "An error occurred during the
> installation of the device". The required line was was not found in the
> INF".

No wonder... The net class coinstaller looked for it's stuff
and didn't found it => failure.

> another question, how do make the driver to start disabled?

As Doron wrote, your requirement is quite unusual.
Try to make up a standard netcard INF (with all required sections)
and a minimal dummy driver, that returns from DriverEntry
with some error and won't register with ndis.
This won't look exactly as disabled device, but close enough...

--PA

Doron Holan [MS]

unread,
Dec 13, 2005, 1:35:01 PM12/13/05
to
Like Pavel said, the net class installer is looking for INF entries that are
not present. The net class has a decent amount of custom requirements for
what goes into a NIC's INF. You will need to reproduce all of these
requirements inyour INF.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.

This posting is provided "AS IS" with no warranties, and confers no rights.

"Pavel A." <pav...@NOwritemeNO.com> wrote in message

news:61803F6E-8A90-4490...@microsoft.com...

Eliyas Yakub [MSFT]

unread,
Dec 13, 2005, 3:37:26 PM12/13/05
to
Here is a network class specific NULL INF I quickly put together. This one
works except that it prompts for a useless reboot in the end. I don't know
how to avoid that.

[Version]
Signature="$WINDOWS NT$"
Class = Net
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}

;*****************************************
; Roaster Device Install Section
;*****************************************


[Manufacturer]
%StdMfg%=Standard


[Standard]
; DisplayName Section DeviceId
; ----------- ------- --------

%RoasterDevice.DeviceDesc%=Roaster_Device.ndi, Roaster\MsRoaster

[Roaster_Device.ndi]
Characteristics = 0x10; NCF_NO_SERVICE

[Roaster_Device.ndi]
;


;-------------- Service installation


[Roaster_Device.ndi.Services]
AddService = , %SPSVCINST_ASSOCSERVICE%,


[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
MSFT = "Microsoft"
StdMfg = "(Standard system devices)"
ClassName = "Roaster"
RoasterDevice.DeviceDesc = "Microsoft Roaster"

--
-Eliyas


This posting is provided "AS IS" with no warranties, and confers no rights.

http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx


eti...@gmail.com

unread,
Dec 14, 2005, 11:26:57 AM12/14/05
to
thank you very much.

except for the reboot issue (which is not that big of an issue for me,
because i just cancel it) that is what i've looked for.
does any one know how to prevent the reboot pop up?

again,
thank you all.

Pavel A.

unread,
Dec 15, 2005, 6:11:02 PM12/15/05
to
"eti...@gmail.com" wrote:
> does any one know how to prevent the reboot pop up?

Yes sure :)
Either do not use Net class for your null driver, or make a real "dummy"
ndis miniport.

--PA

0 new messages