I am getting this error when I try to load my .inf.
This device is not configured correctly. (Code 1).
I looked this up on the MSDN site and the explanation did not give me enough
info to help. Is there a way to get more information about what it wants or
does not want? I ran it through chkinf and that did not help.
I noticed in the WDK doc on .inf “(exceptions are INF files for modems and
display monitors)” that I might not need DDInstall.Services Section ,but
that was not the issue.
Ideas?
[Version]
Signature=“$WINDOWS NT$”
Class=Modem
ClassGUID={4D36E96D-E325-11CE-BFC1-08002BE10318}
Provider=%Mfg%
DriverVer=04/30/2007,6.0.6000.16386
;INF files that are not distributed with the OS should contain the following
line:
CatalogFile=KmdfSamples.cat
;INF files that are to be distributed with the OS that load a service and or
files on the CD, should contain the following line:
;Layoutfile=layout.inf
;----------------------------------------------------------------------------------------------------------------------------;
Below is list of manufacturers that will appear in the
; Install New Modem wizard’s list of manufacturers as well as define what
sections to install ID’s from
; The vendor will be required to change the provider key before a
; driver submission is made
[Manufacturer]
%Generic% = Generic,NTx86
;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;This section references the INF-writer-defined DDInstall and
DDInstall.Services sections for the Modem device, and specifies the hardware
identifier for the Modem device.
; Following section is meant for Windows 2000 as it
; cannot parse decorated model sections
[Generic]
%ModemX% = ModemX, {4D36E96D-E325-11CE-BFC1-08002BE10318}\fakemodem
; Decorated model section take precedence over undecorated
; ones on XP and later.
[Generic.NTx86]
%ModemX% = ModemX, {4D36E96D-E325-11CE-BFC1-08002BE10318}\fakemodem
;-------------------------------------------------------------------------------------------------------
; For detailed explanation of DDInstall.Services section, please reference
DDK.
; Installation section references other INF sections to be installed for a
specific modem.
; The AddReg line points to sections of the INF file that list registry
entries to be added when
; installing this modem. For example, the line below instructs the
installer to add the registry
; entries listed in the following sections of this INF file:
; [All], [MfgAddReg], [ExtraCRLFResponses], [ModemX.AddReg], [INTERNAL]
; It is not necessary to break up the registry additions into different
sections in the
; INF. However, breaking out common entries into sections can help to
reduce the size of
; the INF if multiple modems are installed from the same INF and have common
registry
; entries.
[ModemX.NT]
CopyFiles = CopyFileSection
AddReg = All, MfgAddReg, ExtraCRLFResponses, ModemX.AddReg, INTERNAL
;[ModemX.NT.Services]
AddService = wdfdio, 0x00000000, FakeModm_Service_Inst,
FakeModm_Logging_Inst
;[ModemX.NT.HW]
;AddReg = LowerFilterAddReg
;[LowerFilterAddReg]
;HKR,“LowerFilters”,0x00010000,fakemdm
[FakeModm_Service_Inst]
DisplayName = %ModemX%
ServiceType = 1
StartType = 3
ErrorControl = 0
ServiceBinary = %12%\wdfdio.sys
;--------------------------------------------------------------------------------------------------------------------
; An event-log-install-section
[FakeModm_Logging_Inst]
AddReg = FakeModm_Logging_Inst_AddReg
[FakeModm_Logging_Inst_AddReg]
HKR,EventMessageFile,0x00020000,“%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\wdfdio.sys”
HKR,TypesSupported,0x00010001,7
[SourceDisksNames]
99=%FakeDisk%, disk1,“”
[SourceDisksFiles]
wdfdio.sys = 99
;-------------------------------------------------------------------------------------------------------------------
; Section used to copy files required for device to function
[CopyFileSection]
wdfdio.sys
;--------------------------------------------------------------------------------------------------------------------------
; This section lists the Default location to copy the files listed in the
copyfiles directive
; 12 = %Windows%\System32\Drivers
[DestinationDirs]
CopyFileSection=12
DefaultDestDir=12
“Doron Holan” wrote in message
news:xxxxx@ntdev…
1) you need a hardware ID and an instance ID, you can skip the
compatible ID
2) ignore how fakemodem is installed b/c that is a root enumerated
device. The steps in fakemodem talk about adding a device that the
machine cannot detect, while your PDOs are detectable devices. When you
enumerate the modem PDO, you will get a found new hardware popup and
will be asked for the INF. If you know KMDF is already on the machine,
then there is no need to specify the kmdf coinstaller again in the modem
INF.
3) what symbolic link name are you trying to create? A COM name? If
so, you don’t use a hardcoded com name, instead, the ports class
installer will assign you a name. you read this value (“PortName”) out
of the registry during EvtDevicePrepareHardware and create the symbolic
link then. You are getting this error b/c the PDO you created is not
yet a real PDO as recognized by the OS. As such, we cannot query for
the PDO’s name (which was autogenerated by the OS) until it is a
recognized PDO
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Greg Coleson
Sent: Friday, May 04, 2007 9:01 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] advice on driver implementation
Doron,
There are many pieces of this that I am not clear on.
1) Do I need to do any of these if I want the modem PDOs.
//
// Note same string is used to initialize hardware id too
//
status = WdfPdoInitAddHardwareID(pDeviceInit, &deviceId);
if (!NT_SUCCESS(status)) {
goto Cleanup;
}
status = WdfPdoInitAddCompatibleID(pDeviceInit, &compatId);
if (!NT_SUCCESS(status)) {
goto Cleanup;
}
status = WdfPdoInitAssignInstanceID(pDeviceInit, &buffer);
if (!NT_SUCCESS(status)) {
goto Cleanup;
}
2)
So I just follow the install for the fake modem in the fakemodem.htm?
Can I just skip the copyfile section in the .inf because I already have
the
WDF files and my driver already on the system from the install of my
voice
driver PDO on the PCI bus?
To install the bus driver on Windows XP and Windows Server 2003:
1… Double-click the ‘Add Hardware’ wizard in Control Panel.
2… At the ‘Welcome to the Add Hardware Wizard’, click ‘Next’.
3… Select ‘Yes, I have already connected the hardware’, then click
Next.
4… Select ‘Add a new hardware device’ from the list, then click Next.
5… Select ‘Install the hardware that I manually select from a
list(Advanced),’ and then click next.
6… Select ‘Modems’, then click Next.
7… Check the box which says “Don’t detect my modems; I will select it
from a list.”, then click Next.
8… Click ‘Have Disk’, make sure that 'A:' is in the “Copy
manufacturer’s
files from:” box, and click OK.
9… Click on the desired entry, and then click Next.
10… At ‘The wizard is ready to install your hardware’, click Next.
11… Click Finish at ‘Completing the Add/Remove Hardware Wizard.’
3) I have the PDO created for the modem in the AddDevice call. All the
PDO
creation works fine when I try to WdfDeviceCreateSymbolicLink that call
complains with this error. I am calling it with the device handle from
the
child PDO create.
//
// MessageId: STATUS_INVALID_DEVICE_STATE
//
// MessageText:
//
// The device is not in a valid state to perform this request.
//
#define STATUS_INVALID_DEVICE_STATE ((NTSTATUS)0xC0000184L)
Ideas?
Thanks,
Greg
“Doron Holan” wrote in message
news:xxxxx@ntdev…
If you have a fixed number of PDOs (5 in this case) regardless of the
hw, adding the PDOs during EvtDriverDeviceAdd is the best place. If you
need to create the PDOs based on hw state/capabilities, do in
EvtDeviceSelfManagedIoInit. EvtDevicePrepareHardware can be called
multiple times (paired with EvtDeviceReleaseHardware) which would mean
you would have to track state. EvtDeviceSelfManagedIoInit is only
called once for the lifetime of a FDO.
As for the INF advise Robert gave, I would have to disagree. You need
the modems to be in their own device class. You don’t want the parent
FDO to be in the modem device class though. This means you should have
1 INF for the FDO, and another INF for the modem PDOs. The device class
of the INF for the FDO can be anything you want, the PDO’s INF device
class must be the modem device class.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Monday, April 30, 2007 6:23 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] advice on driver implementation
Oops- it occurred to me that you probably want to do the reporting at
EvtPrepareHardware- all the resources are there, an dpower is on, etc.
Doron would of course have better advice…
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer