reuse the request, that is what WdfRequestReuse is for
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"AO" <> wrote in message
news:2A2CEB40-EA09-4A1B-BCDE-...
> I create a card tracking request at D0 entry. The RDF_CARD_TRACKING
> callback
> will then be called when a card is inserted in the card reader. So far so
> good. In the request's corresponding completion routine, I delete the
> request, create a new card tracking request and set the completion routine
> so
> that the RDF_CARD_TRACKING callback will be called on the next card status
> change as well. An option would also be to reuse the old request, I guess.
> The completion routine has the following declaration:
>
> VOID
> WdfRequestSetCompletionRoutine(
> IN WDFREQUEST Request,
> IN OPTIONAL PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine,
> IN OPTIONAL WDFCONTEXT CompletionContext
> );
>
> If the card tracking request creation would fail in the completion
> routine,
> there is no way to indicate failure to the outside world due the above
> declaration. I guess I could get a bugcheck later on or is it okay if the
> request creation fails? I mean, the driver won't detect any card status
> changes but any SMCLIB callbacks won't be called either, right? It is okay
> to
> create a new card tracking request in the completion routine, isn't it? If
> not, where would I otherwise start the card tracking again...?
|