Don
Wed Oct 17 05:13:53 PDT 2007
How did you install the device? You need an INF file that descrives the
particular function you are managing. If you install the driver with
StartService you will get the behavior you described.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website:
http://www.windrvr.com
Blog:
http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"Hasitha" <Hasitha@discussions.microsoft.com> wrote in message
news:8269D352-6395-4EA1-85E5-2EBEA874ECB1@microsoft.com...
>> After DriverEntry and an AddDevice as part of the IRP_MJ_PNP
> In my code says as bellow
> pDriverObject->MajorFunction[IRP_MJ_PNP]= PciDrvDispatchPnp;
> pDriverObject->MajorFunction[IRP_MJ_CREATE]= create;
> pDriverObject->MajorFunction[IRP_MJ_CLOSE]= close;
> pDriverObject->MajorFunction[IRP_MJ_READ]= read;
> pDriverObject->MajorFunction[IRP_MJ_WRITE]= write;
> pDriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]= ioControl;
> pDriverObject->DriverUnload= unload;
> pDriverObject->DriverExtension->AddDevice= PciDrvAddDevice;
>
> then try to open driver using
> hdriver = CreateFile(DRIVER_FILE_NAME,
> GENERIC_READ | GENERIC_WRITE,
> 0,
> NULL,
> OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL,
> NULL);
> and start service
> but
> PciDrvDispatchPnp or PciDrvAddDevice did not call.
> what would be the reason. Do i have to write PNP driver.
> Is there any method dispatch IRP_MJ_PNP manually.
>
> "Don Burn" wrote:
>
>>
>> "Hasitha" <Hasitha@discussions.microsoft.com> wrote in message
>> news:863018F5-E624-4BE9-9848-1D939D42B69D@microsoft.com...
>> > Thanks for the answers.
>> >
>> > >Are the subsystems independant?
>> > yes
>>
>> Then you do not need a bus driver, just describe the functions as
>> devices.
>>
>> >> If they are separate just write 7 drivers, if the hardware is shared
>> >> you
>> >> need to >write a bus driver if you truly want 7 drivers.
>> > where can i find a good example for it.
>> >
>> >> Interrupts are provided to you in IRP_MN_START_DEVICE like the other
>> >> hardware resources.
>> > When it is called. Is it call after DriverEntry.
>>
>> After DriverEntry and an AddDevice as part of the IRP_MJ_PNP
>>
>> >> I am curious why you state you have to use the WDM model? What OS are
>> >> you
>> >> trying to support that does not support KMDF?
>> > WindowsXP . it is a customer requirement .
>>
>> Is that Windows XP or Windows XP SP2 if the latter KMDF works fine.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Website:
http://www.windrvr.com
>> Blog:
http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>>
>>
>>