Hey !
I'm tracking running processes (via a notify routine) in a list , where each process has a dedicated structure .
on post close I pend the operation (via returning STATUS_MORE_PROCESSING_REQUIRED) and queuing a deferred work item
the work item needs access to the handle's owner process structure , the issue is I can see the process is being terminated (and thus it's process structure freed and unlinked from the list) before my work routine get's executed...
when I was thinking of this design , I thought that by pending the operation im forcing the termination prcoess to wait as the IrpList of the relevant thread is not empty , but I guess that is not the case? or maybe the callback is invoked prior to the wait ? if so , what can I do about it ?