Tech Support > Microsoft Windows > Drivers > What is wrong with this Inf file?
What is wrong with this Inf file?
Posted by Wilco on June 27th, 2008


What is wrong with this Inf file?
When installing the add new hardware wizard exits with "Incorrect
parameter".
It however copies the sys file to the system32 directory but doesn't
copy the inf file.
Reinstalling the driver (same routine, inf and sys file) installs the
driver flawlessly.

;
; Inf file for 64-bit operating systems
;

[version]
Signature = "$Windows NT$"
Class = Net
ClassGUID = {MyCorp generated GUID}
Provider = %MyCorp%
DriverVer = 01/01/2008, 1.0.1.15

[Manufacturer]
%MyCorp% = MyCorp.Mfg, NTamd64

[MyCorp.Mfg.NTamd64]
%MyDevice.DeviceDesc% = MyDevice.ndi, MYCORP\*NAMEDDEVICE
%MyDevice.DeviceDesc% = MyDevice.ndi, *NAMEDDEVICE

;-----------------------------------------------------------------------------------------
; MyCorp Ethernet Adapter
;
[MyDevice.ndi.NTamd64]
Characteristics = 0x84
BusType = 5
AddReg = MyDevice.Reg, ParamsPromiscuous.Reg,
ParamsSpeed.Reg, ParamsMac.Reg
CopyFiles = MyDevice.CopyFiles

[MyDevice.ndi.NTamd64.Services]
AddService = MyDevice, 2, MyDevice.Service, MyDevice.EventLog

;-----------------------------------------------------------------------------------------
; MyCorp Virtual Miniport Register
;
[MyDevice.Reg]
HKR, , BusNumber, 0, "0"
HKR, Ndi, Service, 0, "MyDevice"
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"

[ParamsPromiscuous.Reg]
HKR, Ndi\Params\Promiscuous, ParamDesc, , %Promiscuous%
HKR, Ndi\Params\Promiscuous, Default, , "0"
HKR, Ndi\Params\Promiscuous, type, , "enum"
HKR, Ndi\Params\Promiscuous\enum, "0", , %Promiscuous_Disable
%
HKR, Ndi\Params\Promiscuous\enum, "1", , %Promiscuous_Enable%

[ParamsSpeed.Reg]
HKR, Ndi\params\SpeedDuplex, ParamDesc, 0, %SpeedDuplex%
HKR, Ndi\params\SpeedDuplex, default, 0, "0"
HKR, Ndi\params\SpeedDuplex, type, 0, "enum"
HKR, Ndi\params\SpeedDuplex\enum, "0", 0, %AutoDetect%
HKR, Ndi\params\SpeedDuplex\enum, "1", 0, %10Mb-Half-Duplex%
HKR, Ndi\params\SpeedDuplex\enum, "2", 0, %10Mb-Full-Duplex%
HKR, Ndi\params\SpeedDuplex\enum, "3", 0, %100Mb-Half-Duplex%
HKR, Ndi\params\SpeedDuplex\enum, "4", 0, %100Mb-Full-Duplex%

[ParamsMac.Reg]
HKR, Ndi\params\NetworkAddress, ParamDesc, 0, %MACAddress%
HKR, Ndi\params\NetworkAddress, type, 0, "edit"
HKR, Ndi\params\NetworkAddress, LimitText, 0, "12"
HKR, Ndi\params\NetworkAddress, UpperCase, 0, "1"
HKR, Ndi\params\NetworkAddress, default, 0, ""
HKR, Ndi\params\NetworkAddress, optional, 0, "1"

;-----------------------------------------------------------------------------------------
; Driver and Service Section
;
[MyDevice.CopyFiles]
MyDevice.sys,,,2

[MyDevice.Service]
DisplayName = %MyDevice.Service.DispName%
ServiceType = 1 ;%SERVICE_KERNEL_DRIVER%
StartType = 3 ;%SERVICE_DEMAND_START%
ErrorControl = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\MyDevice.sys
LoadOrderGroup = NDIS
AddReg = TextModeFlags.Reg

[MyDevice.EventLog]
AddReg = MyDevice.AddEventLog.Reg

[MyDevice.AddEventLog.Reg]
HKR, , EventMessageFile, 0x00020000, "%SystemRoot%
\System32\netevent.dll;%SystemRoot%\System32\drive rs\MyDevice.sys"
HKR, , TypesSupported, 0x00010001, 7

[TextModeFlags.Reg]
HKR, , TextModeFlags, 0x00010001, 0x0001

[SourceDisksNames.amd64]
1 = %DiskId1%,,,""

[SourceDisksFiles.amd64]
MyDevice.sys = 1,,

;-----------------------------------------------------------------------------------------
; DestinationDirs
;
[DestinationDirs]
MyDevice.CopyFiles = 12

;-----------------------------------------------------------------------------------------
; Localizable Strings
;
[Strings]
MyCorp = "MyCorp Company"
MyDevice.DeviceDesc = "MyCorp MyDevice Gigabit Ethernet
Port"
MyDevice.Service.DispName = "MyCorp MyDevice Miniport Ethernet
Adapter Service"
DiskId1 = "MyCorp Installation Disk #1 (NDIS
Image)"

Promiscuous = "Promiscuous mode"
Promiscuous_Disable = "Disable"
Promiscuous_Enable = "Enable"

AutoDetect = "Auto Detect"
SpeedDuplex = "Link Speed & Duplex"
10Mb-Half-Duplex = "10Mbps/Half Duplex"
10Mb-Full-Duplex = "10Mbps/Full Duplex"
100Mb-Half-Duplex = "100Mbps/Half Duplex"
100Mb-Full-Duplex = "100Mbps/Full Duplex"

MACAddress = "Network Address"

Posted by chris.aseltine@gmail.com on June 27th, 2008


On Jun 27, 7:24 am, Wilco <w.vante...@gmail.com> wrote:

Why are you using Class=Net but your own class GUID? I don't think
that's right.

Posted by Wilco on June 27th, 2008


On 27 jun, 14:57, chris.aselt...@gmail.com wrote:
Correct this should have said:
ClassGuid = {4d36e972-e325-11ce-bfc1-08002be10318}
That's what it did before I posted it (I guess I generalised it a bit
too good .
Anyway, not the solution, but thanks for pointing it out.

Posted by Wilco on June 27th, 2008


On 27 jun, 15:19, Wilco <w.vante...@gmail.com> wrote:
Btw the debugger prints
Net Config Assert Failure:
File d:\nt\net\config\netcfg\engine\compdefs.h, line 81:
Assert(FIsValidNetClass (Class))


Similar Posts