Re: Question about workitem.

Tech-Archive recommends: Speed Up your PC by fixing your registry



what is the sync level that you specify when creating your WDFDEVICE?

--
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.


"May" <May@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:B7CB3A4A-8582-476D-800C-29B50463E215@xxxxxxxxxxxxxxxx
Hello,
I need to do several things after I got interrupt. In between the several
things, I need to call delay to wait a little bit. But I couldn't call delay
at DPC level, so in my interrupt DPC routine, I call a function to create a
work item and do all those things at workitem call back function. I followed
sample of kmdf\pcidrv which do the same thing I want to do. But when I call
WdfWorkItemCreate, I got error "STATUS_WDF_INCOMPATIBLE_EXECUTION_LEVEL"

I couldn't figure out why since I do the exact same thing with sample code
of pcidrv?

It was said "Parent object's execution level is not WDFExecutionLevelPassive?

In PCIDRV, the parent object is wdfDevice which initialize at EvtDeviceAdd,
I did same thing.
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CCP_WORKITEM);
attributes.ParentObject = FdoData->WdfDevice;

What is wrong? where is wrong? What is the best way to do this?

Thanks,

May

.