Let's say you're doing an asynchronous operation (like ReadDirectoryChangesW
) using I/O completion ports. And for each call to the function, you allocate an OVERLAPPED
structure (perhaps with some additional data) for use within the I/O completion callback. And then within the callback, after the OVERLAPPED
structure has been used, you free the memory using the pointer provided as an argument.
Now let's say it's time to shut everything down and cancel any pending asynchronous calls. Is there a function you can call to retrieve a pointer to the OVERLAPPED
structure used in any currently pending I/O operation, so that you can free the memory?