Hello,
it appears as if calling IWDFIoRequest::UnmarkCancelable does not directly
release the respective IRequestCallbackCancel object, which has been passed
when calling method IWDFIoRequest::MarkCancelable. By debugging the driver I
can see that the reference counter is increased on calling
IWDFIoRequest::MarkCancelable but not decreased when calling
IWDFIoRequest::UnmarkCancelable.
This poses a problem, because under certain conditions I want to remove a
set of objects within my driver. However, one object is not freed, because
its reference counter is not zero. However, when I remove the driver, then
the destructor of this object is called and in the callstack I can see that
it is called by the framework. So I supposed that this is the release call
for the IRequestCallbackCancel object.
Why is this object not directly released on calling
IWDFIoRequest::UnmarkCancelable()?
Best regards,
Andre